Function at 0x4655e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d84d0
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x5176f0]
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 0x46561c
xor eax, eax
jmp 0x465844
mov eax, dword [esi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x465645
mov eax, dword [esi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x465645
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 0x465844
cmp dword [esi + 0x54], 0
je 0x465841
mov ecx, dword [esi + 0x10]
lea edx, [esi + 0x48]
cmp dword [ecx], edx
jne 0x46566d
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 0x465693
mov esi, dword [esi + 0x54]
movsx eax, bl
push esi
push eax
call fcn.004b226f
add esp, 8
cmp eax, 0xffffffff
je 0x465841
mov eax, ebx
jmp 0x465844
push ecx
mov ecx, esp
mov byte [ebp - 0x2d], bl
mov dword [ebp - 0x40], esp
call fcn.00407190
lea ecx, [ebp - 0x2c]
call fcn.0040af60
push 0
push 0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0
call fcn.0040b020
push 0
push 8
lea ecx, [ebp - 0x2c]
call fcn.0040acc0
test al, al
je 0x4656e4
push 0
push 8
push 0
lea ecx, [ebp - 0x2c]
call fcn.004167d0
push 8
lea ecx, [ebp - 0x2c]
call fcn.0040afe0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 1
call fcn.0040b0c0
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x34]
mov edi, eax
call fcn.0040d8c0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x34], edi
call fcn.0040b0c0
lea edx, [ebp - 0x2c]
push edx
lea ecx, [ebp - 0x38]
mov ebx, eax
call fcn.0040d8c0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x38], ebx
call fcn.004042b0
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 0x465839
cmp eax, 1
jg 0x465862
lea ecx, [ebp - 0x2c]
call fcn.0040b0c0
mov ebx, eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x48]
call fcn.0040d8c0
mov edi, dword [ebp - 0x3c]
sub edi, ebx
mov dword [ebp - 0x48], ebx
je 0x4657a9
lea ecx, [ebp - 0x2c]
call fcn.0040b0c0
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x40]
mov ebx, eax
call fcn.0040d8c0
mov edx, dword [esi + 0x54]
push edx
push edi
push 1
push ebx
mov dword [ebp - 0x40], ebx
call fcn.004b5a35
add esp, 0x10
cmp edi, eax
jne 0x465839
lea eax, [ebp - 0x2d]
mov byte [esi + 0x49], 1
cmp dword [ebp - 0x44], eax
jne 0x46589b
test edi, edi
jne 0x4657d5
lea ecx, [ebp - 0x2c]
call fcn.004042b0
lea ecx, [ebp - 0x2c]
cmp eax, 0x20
jae 0x46583c
push edi
push 8
call fcn.00414e90
lea ecx, [ebp - 0x2c]
call fcn.0040b0c0
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x34]
mov edi, eax
call fcn.0040d8c0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x34], edi
call fcn.0040b0c0
lea edx, [ebp - 0x2c]
push edx
lea ecx, [ebp - 0x38]
mov ebx, eax
call fcn.0040d8c0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x38], ebx
call fcn.004042b0
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 0x46574f
lea ecx, [ebp - 0x2c]
call fcn.0040b0a0
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.004ae123
mov esp, ebp
pop ebp
ret 4
cmp eax, 3
jne 0x465839
mov esi, dword [esi + 0x54]
movsx eax, byte [ebp - 0x2d]
push esi
push eax
call fcn.004b226f
add esp, 8
cmp eax, 0xffffffff
je 0x46588c
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
call fcn.0040b0a0
mov eax, esi
jmp 0x465844
lea ecx, [ebp - 0x2c]
or esi, 0xffffffff
call fcn.0040b0a0
mov eax, esi
jmp 0x465844
lea ecx, [ebp - 0x2c]
call fcn.0040b0a0
mov eax, dword [ebp + 8]
jmp 0x465844