Function at 0x465120
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b2990
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x4eb690]
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 0x46515c
xor eax, eax
jmp 0x465384
mov eax, dword [esi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x465185
mov eax, dword [esi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x465185
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 0x465384
cmp dword [esi + 0x54], 0
je 0x465381
mov ecx, dword [esi + 0x10]
lea edx, [esi + 0x48]
cmp dword [ecx], edx
jne 0x4651ad
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 0x4651d3
mov esi, dword [esi + 0x54]
movsx eax, bl
push esi
push eax
call fcn.0048e39f
add esp, 8
cmp eax, 0xffffffff
je 0x465381
mov eax, ebx
jmp 0x465384
push ecx
mov ecx, esp
mov byte [ebp - 0x2d], bl
mov dword [ebp - 0x40], esp
call fcn.004114d0
lea ecx, [ebp - 0x2c]
call fcn.0040a8c0
push 0
push 0
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0
call fcn.0040a980
push 0
push 8
lea ecx, [ebp - 0x2c]
call fcn.0040a5f0
test al, al
je 0x465224
push 0
push 8
push 0
lea ecx, [ebp - 0x2c]
call fcn.00416240
push 8
lea ecx, [ebp - 0x2c]
call fcn.0040a940
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 1
call fcn.0040a690
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x34]
mov edi, eax
call fcn.00403300
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x34], edi
call fcn.0040a690
lea edx, [ebp - 0x2c]
push edx
lea ecx, [ebp - 0x38]
mov ebx, eax
call fcn.00403300
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x38], ebx
call fcn.00404290
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 0x465379
cmp eax, 1
jg 0x4653a2
lea ecx, [ebp - 0x2c]
call fcn.0040a690
mov ebx, eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x48]
call fcn.00403300
mov edi, dword [ebp - 0x3c]
sub edi, ebx
mov dword [ebp - 0x48], ebx
je 0x4652e9
lea ecx, [ebp - 0x2c]
call fcn.0040a690
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x40]
mov ebx, eax
call fcn.00403300
mov edx, dword [esi + 0x54]
push edx
push edi
push 1
push ebx
mov dword [ebp - 0x40], ebx
call fcn.00491a95
add esp, 0x10
cmp edi, eax
jne 0x465379
lea eax, [ebp - 0x2d]
mov byte [esi + 0x49], 1
cmp dword [ebp - 0x44], eax
jne 0x4653db
test edi, edi
jne 0x465315
lea ecx, [ebp - 0x2c]
call fcn.00404290
lea ecx, [ebp - 0x2c]
cmp eax, 0x20
jae 0x46537c
push edi
push 8
call fcn.004148a0
lea ecx, [ebp - 0x2c]
call fcn.0040a690
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x34]
mov edi, eax
call fcn.00403300
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x34], edi
call fcn.0040a690
lea edx, [ebp - 0x2c]
push edx
lea ecx, [ebp - 0x38]
mov ebx, eax
call fcn.00403300
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x38], ebx
call fcn.00404290
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 0x46528f
lea ecx, [ebp - 0x2c]
call fcn.0040aa00
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.0048a346
mov esp, ebp
pop ebp
ret 4
cmp eax, 3
jne 0x465379
mov esi, dword [esi + 0x54]
movsx eax, byte [ebp - 0x2d]
push esi
push eax
call fcn.0048e39f
add esp, 8
cmp eax, 0xffffffff
je 0x4653cc
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
call fcn.0040aa00
mov eax, esi
jmp 0x465384
lea ecx, [ebp - 0x2c]
or esi, 0xffffffff
call fcn.0040aa00
mov eax, esi
jmp 0x465384
lea ecx, [ebp - 0x2c]
call fcn.0040aa00
mov eax, dword [ebp + 8]
jmp 0x465384