Function at 0x46fb90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d2d78
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x513330]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push esi
push edi
mov eax, dword [0x513330]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov edi, ecx
mov dword [esp + 0x18], edi
cmp ebx, 0xffffffff
jne 0x46fbdc
xor eax, eax
jmp 0x46fef9
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x46fc05
mov eax, dword [edi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x46fc05
dec dword [eax]
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
mov byte [ecx], bl
mov eax, ebx
jmp 0x46fef9
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x46fef6
cmp dword [edi + 0x3c], 0
jne 0x46fc33
push eax
movsx eax, bl
push eax
call fcn.004a97db
add esp, 8
cmp eax, 0xffffffff
je 0x46fef6
mov eax, ebx
jmp 0x46fef9
lea esi, [esp + 0x34]
mov byte [esp + 0x17], bl
call fcn.00425080
add edi, 0x44
mov dword [esp + 0x60], 0
mov dword [esp + 0x20], edi
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x4c]
cmp edx, 0x10
jb 0x46fe18
mov ebx, ecx
mov dword [esp + 0x1c], ebx
test ecx, ecx
je 0x46fc8e
mov eax, ecx
cmp edx, 0x10
jae 0x46fc75
lea eax, [esp + 0x38]
cmp eax, ebx
ja 0x46fc8e
mov eax, ecx
cmp edx, 0x10
jae 0x46fc84
lea eax, [esp + 0x38]
mov esi, dword [esp + 0x48]
add eax, esi
cmp ebx, eax
jbe 0x46fc9b
call fcn.004a717b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
cmp eax, 0xfffffffc
je 0x46fcc6
mov eax, ecx
cmp edx, 0x10
jae 0x46fcaf
lea eax, [esp + 0x38]
mov esi, dword [esp + 0x48]
add eax, esi
cmp ebx, eax
jb 0x46fcc6
call fcn.004a717b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x48]
cmp edx, 0x10
jb 0x46fe25
mov edi, ecx
test ecx, ecx
je 0x46fd01
mov eax, ecx
cmp edx, 0x10
jae 0x46fce4
lea eax, [esp + 0x38]
cmp eax, edi
ja 0x46fd01
mov eax, ecx
cmp edx, 0x10
jae 0x46fcf3
lea eax, [esp + 0x38]
mov ebx, dword [esp + 0x48]
add eax, ebx
mov ebx, dword [esp + 0x1c]
cmp edi, eax
jbe 0x46fd0e
call fcn.004a717b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
cmp eax, 0xfffffffc
je 0x46fd31
mov eax, ecx
cmp edx, 0x10
jae 0x46fd22
lea eax, [esp + 0x38]
mov ecx, dword [esp + 0x48]
add eax, ecx
cmp edi, eax
jb 0x46fd31
call fcn.004a717b
mov edx, dword [esp + 0x18]
mov ecx, dword [edx + 0x3c]
mov eax, dword [ecx]
mov eax, dword [eax + 0x14]
lea edx, [esp + 0x28]
push edx
add ebx, esi
push ebx
push edi
lea edx, [esp + 0x30]
push edx
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x2b]
push edx
mov edx, dword [esp + 0x38]
push edx
call eax
test eax, eax
jl 0x46feed
cmp eax, 1
jg 0x46fea6
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
cmp edx, 0x10
jb 0x46fe2e
mov edi, ecx
test ecx, ecx
je 0x46fda8
mov eax, ecx
cmp edx, 0x10
jae 0x46fd8f
lea eax, [esp + 0x38]
cmp eax, edi
ja 0x46fda8
mov eax, ecx
cmp edx, 0x10
jae 0x46fd9e
lea eax, [esp + 0x38]
mov esi, dword [esp + 0x48]
add eax, esi
cmp edi, eax
jbe 0x46fdb5
call fcn.004a717b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
cmp eax, 0xfffffffc
je 0x46fde0
mov eax, ecx
cmp edx, 0x10
jae 0x46fdc9
lea eax, [esp + 0x38]
mov esi, dword [esp + 0x48]
add eax, esi
cmp edi, eax
jb 0x46fde0
call fcn.004a717b
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x28]
sub esi, edi
je 0x46fe70
lea ebx, [esp + 0x2c]
lea edi, [esp + 0x34]
call fcn.004251b0
mov edi, eax
mov eax, dword [edi]
cmp eax, 0xfffffffc
je 0x46fe49
test eax, eax
jne 0x46fe0b
call fcn.004a717b
mov eax, dword [edi]
cmp dword [eax + 0x18], 0x10
jb 0x46fe37
mov ecx, dword [eax + 4]
jmp 0x46fe3a
lea ebx, [esp + 0x38]
mov dword [esp + 0x1c], ebx
jmp 0x46fc6a
lea edi, [esp + 0x38]
jmp 0x46fcd9
lea edi, [esp + 0x38]
jmp 0x46fd84
lea ecx, [eax + 4]
mov edx, dword [eax + 0x14]
add edx, ecx
cmp dword [edi + 4], edx
jb 0x46fe49
call fcn.004a717b
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x4c]
mov edi, dword [edi + 4]
push ecx
push esi
push 1
push edi
call fcn.004a7e34
add esp, 0x10
cmp esi, eax
jne 0x46feed
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
mov byte [eax + 0x41], 1
lea eax, [esp + 0x17]
cmp dword [esp + 0x24], eax
jne 0x46fedf
test esi, esi
ja 0x46fc57
cmp dword [esp + 0x48], 0x20
jae 0x46feed
push 0
mov eax, 8
lea edi, [esp + 0x38]
call fcn.004250e0
jmp 0x46fc4f
cmp eax, 3
jne 0x46feed
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 0x4c]
mov cl, byte [esp + 0x17]
call fcn.0046e420
test al, al
je 0x46fecf
mov esi, dword [ebp + 8]
lea ecx, [esp + 0x34]
call fcn.0042f1e0
mov eax, esi
jmp 0x46fef9
lea ecx, [esp + 0x34]
or esi, 0xffffffff
call fcn.0042f1e0
mov eax, esi
jmp 0x46fef9
lea ecx, [esp + 0x34]
call fcn.0042f1e0
mov eax, dword [ebp + 8]
jmp 0x46fef9
lea ecx, [esp + 0x34]
call fcn.0042f1e0
or eax, 0xffffffff
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.004a52a5
mov esp, ebp
pop ebp
ret 4