Function at 0x46d3c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a8be0
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x4e06b8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x46d3fc
xor eax, eax
jmp 0x46d624
mov eax, dword [esi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x46d425
mov eax, dword [esi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x46d425
dec dword [eax]
mov esi, dword [esi + 0x24]
mov eax, dword [esi]
lea ecx, [eax + 1]
mov dword [esi], ecx
mov byte [eax], bl
mov eax, ebx
jmp 0x46d624
cmp dword [esi + 0x54], 0
je 0x46d621
mov ecx, dword [esi + 0x10]
lea edx, [esi + 0x48]
cmp dword [ecx], edx
jne 0x46d44d
mov edx, dword [esi + 0x3c]
mov eax, dword [esi + 0x40]
mov dword [ecx], edx
mov ecx, dword [esi + 0x20]
mov dword [ecx], eax
mov edx, dword [esi + 0x30]
sub eax, eax
mov dword [edx], eax
cmp dword [esi + 0x44], 0
jne 0x46d473
mov esi, dword [esi + 0x54]
movsx eax, bl
push esi
push eax
call fcn.004864bf
add esp, 8
cmp eax, 0xffffffff
je 0x46d621
mov eax, ebx
jmp 0x46d624
push ecx
mov ecx, esp
mov byte [ebp - 0x2d], bl
mov dword [ebp - 0x40], esp
call fcn.00411420
lea ecx, [ebp - 0x2c]
call fcn.00404340
push 0
push 0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0
call fcn.0040aa00
push 0
push 8
lea ecx, [ebp - 0x2c]
call fcn.0040a6c0
test al, al
je 0x46d4c4
push 0
push 8
push 0
lea ecx, [ebp - 0x2c]
call fcn.00416300
push 8
lea ecx, [ebp - 0x2c]
call fcn.0040a9c0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 1
call fcn.0040aaa0
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x34]
mov edi, eax
call fcn.0041b1f0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x34], edi
call fcn.0040aaa0
lea edx, [ebp - 0x2c]
push edx
lea ecx, [ebp - 0x38]
mov ebx, eax
call fcn.0041b1f0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x38], ebx
call fcn.004027a0
mov ecx, dword [esi + 0x44]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
add eax, edi
lea edi, [ebp - 0x3c]
push edi
push eax
push ebx
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x2d]
push eax
lea eax, [esi + 0x4c]
push eax
call edx
test eax, eax
js 0x46d619
cmp eax, 1
jg 0x46d642
lea ecx, [ebp - 0x2c]
call fcn.0040aaa0
mov ebx, eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x48]
call fcn.0041b1f0
mov edi, dword [ebp - 0x3c]
sub edi, ebx
mov dword [ebp - 0x48], ebx
je 0x46d589
lea ecx, [ebp - 0x2c]
call fcn.0040aaa0
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x40]
mov ebx, eax
call fcn.0041b1f0
mov edx, dword [esi + 0x54]
push edx
push edi
push 1
push ebx
mov dword [ebp - 0x40], ebx
call fcn.00487613
add esp, 0x10
cmp edi, eax
jne 0x46d619
lea eax, [ebp - 0x2d]
mov byte [esi + 0x49], 1
cmp dword [ebp - 0x44], eax
jne 0x46d67b
test edi, edi
jne 0x46d5b5
lea ecx, [ebp - 0x2c]
call fcn.004027a0
lea ecx, [ebp - 0x2c]
cmp eax, 0x20
jae 0x46d61c
push edi
push 8
call fcn.004149e0
lea ecx, [ebp - 0x2c]
call fcn.0040aaa0
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x34]
mov edi, eax
call fcn.0041b1f0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x34], edi
call fcn.0040aaa0
lea edx, [ebp - 0x2c]
push edx
lea ecx, [ebp - 0x38]
mov ebx, eax
call fcn.0041b1f0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x38], ebx
call fcn.004027a0
mov ecx, dword [esi + 0x44]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
add eax, edi
lea edi, [ebp - 0x3c]
push edi
push eax
push ebx
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x2d]
push eax
lea eax, [esi + 0x4c]
push eax
call edx
test eax, eax
jns 0x46d52f
lea ecx, [ebp - 0x2c]
call fcn.0040aa80
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00482469
mov esp, ebp
pop ebp
ret 4
cmp eax, 3
jne 0x46d619
mov esi, dword [esi + 0x54]
movsx eax, byte [ebp - 0x2d]
push esi
push eax
call fcn.004864bf
add esp, 8
cmp eax, 0xffffffff
je 0x46d66c
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
call fcn.0040aa80
mov eax, esi
jmp 0x46d624
lea ecx, [ebp - 0x2c]
or esi, 0xffffffff
call fcn.0040aa80
mov eax, esi
jmp 0x46d624
lea ecx, [ebp - 0x2c]
call fcn.0040aa80
mov eax, dword [ebp + 8]
jmp 0x46d624