Function at 0x402ef0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x434e59
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
mov esi, ecx
mov dword [esp + 0x10], edi
cmp ebx, 0xffffffff
jne 0x402f37
xor eax, eax
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x24]
cmp dword [eax], edi
je 0x402f6f
mov ecx, dword [eax]
mov eax, dword [esi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x402f6f
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
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x54], edi
je 0x4031e2
mov ecx, dword [esi + 0x10]
lea edx, [esi + 0x48]
cmp dword [ecx], edx
jne 0x402f96
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], edi
jne 0x402fca
mov esi, dword [esi + 0x54]
movsx eax, bl
push esi
push eax
call fcn.004076e0
add esp, 8
cmp eax, 0xffffffff
je 0x4031e2
mov eax, ebx
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push edi
push 8
lea ecx, [esp + 0x58]
mov byte [esp + 0x14], bl
call fcn.00403bc0
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x54]
mov dword [esp + 0x80], edi
call fcn.00403db0
mov edi, eax
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x54]
mov byte [esp + 0x80], 1
call fcn.00403db0
mov ebx, eax
mov ecx, edi
mov byte [esp + 0x7c], 2
call fcn.00404d10
mov edi, eax
mov eax, dword [esp + 0x64]
mov ecx, ebx
mov dword [esp + 0x14], eax
call fcn.00404d10
mov ecx, dword [esi + 0x44]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea ebx, [esp + 0x18]
push ebx
mov ebx, dword [esp + 0x18]
add ebx, edi
push ebx
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x1d]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esi + 0x4c]
push eax
call edx
lea ecx, [esp + 0x20]
mov edi, eax
mov byte [esp + 0x7c], 1
call fcn.00401130
lea ecx, [esp + 0x2c]
mov byte [esp + 0x7c], 0
call fcn.00401130
test edi, edi
js 0x4031d1
cmp edi, 1
jg 0x4031f9
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x54]
call fcn.00403db0
mov ecx, eax
mov byte [esp + 0x7c], 3
call fcn.00404d10
mov edi, dword [esp + 0x18]
lea ecx, [esp + 0x38]
sub edi, eax
mov byte [esp + 0x7c], 0
call fcn.00401130
test edi, edi
je 0x4030e8
lea ecx, [esp + 0x44]
push ecx
lea ecx, [esp + 0x54]
call fcn.00403db0
mov byte [esp + 0x7c], 4
or dword [esp + 0x10], 1
mov ecx, eax
call fcn.00404d10
mov edx, dword [esi + 0x54]
push edx
push edi
push 1
push eax
call fcn.0040ce20
add esp, 0x10
cmp edi, eax
je 0x4030e8
mov bl, 1
jmp 0x4030ea
xor bl, bl
mov dword [esp + 0x7c], 0
test byte [esp + 0x10], 1
je 0x403107
and dword [esp + 0x10], 0xfffffffe
lea ecx, [esp + 0x44]
call fcn.00401130
test bl, bl
jne 0x4031d1
lea eax, [esp + 0xc]
mov byte [esi + 0x49], 1
cmp dword [esp + 0x1c], eax
jne 0x403242
test edi, edi
jne 0x40313c
cmp dword [esp + 0x64], 0x20
lea ecx, [esp + 0x50]
jae 0x4031d5
push edi
push 8
call fcn.00403c80
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x54]
call fcn.00403db0
mov edi, eax
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x54]
mov byte [esp + 0x80], 1
call fcn.00403db0
mov ebx, eax
mov ecx, edi
mov byte [esp + 0x7c], 2
call fcn.00404d10
mov edi, eax
mov eax, dword [esp + 0x64]
mov ecx, ebx
mov dword [esp + 0x14], eax
call fcn.00404d10
mov ecx, dword [esi + 0x44]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea ebx, [esp + 0x18]
push ebx
mov ebx, dword [esp + 0x18]
add ebx, edi
push ebx
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x1d]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esi + 0x4c]
push eax
call edx
lea ecx, [esp + 0x20]
mov edi, eax
mov byte [esp + 0x7c], 1
call fcn.00401130
lea ecx, [esp + 0x2c]
mov byte [esp + 0x7c], 0
call fcn.00401130
test edi, edi
jns 0x403076
lea ecx, [esp + 0x50]
mov dword [esp + 0x7c], 0xffffffff
call fcn.00402510
or eax, 0xffffffff
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp edi, 3
jne 0x4031d1
mov eax, dword [esi + 0x54]
mov ecx, dword [esp + 0xc]
push eax
push ecx
call fcn.00401be0
add esp, 8
test al, al
je 0x403218
mov esi, dword [ebp + 8]
jmp 0x40321b
or esi, 0xffffffff
lea ecx, [esp + 0x50]
mov dword [esp + 0x7c], 0xffffffff
call fcn.00402510
mov eax, esi
mov ecx, dword [esp + 0x74]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [esp + 0x50]
mov dword [esp + 0x7c], 0xffffffff
call fcn.00402510
mov ecx, dword [esp + 0x74]
mov eax, dword [ebp + 8]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4