Function at 0x402c40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x435098
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x444d08]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
mov eax, dword [0x444d08]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
cmp dword [ecx + 0x3c], 0
mov dword [esp + 0x10], ecx
je 0x402fd5
cmp byte [ecx + 0x41], 0
je 0x402fd5
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push 0xffffffffffffffff
call edx
cmp eax, 0xffffffff
je 0x402fc8
lea esi, [esp + 0x1c]
call fcn.00402920
mov dword [esp + 0x48], 0
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea ebx, [ebx]
cmp ecx, 0x10
jb 0x402dd3
mov ebx, eax
mov dword [esp + 0x14], ebx
test eax, eax
je 0x402cf7
mov edx, eax
cmp ecx, 0x10
jae 0x402cde
lea edx, [esp + 0x20]
cmp edx, ebx
ja 0x402cf7
mov edx, eax
cmp ecx, 0x10
jae 0x402ced
lea edx, [esp + 0x20]
mov esi, dword [esp + 0x30]
add edx, esi
cmp ebx, edx
jbe 0x402d04
call fcn.0041b6df
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x1c]
cmp edx, 0xfffffffc
je 0x402d2f
mov edx, eax
cmp ecx, 0x10
jae 0x402d18
lea edx, [esp + 0x20]
mov esi, dword [esp + 0x30]
add edx, esi
cmp ebx, edx
jb 0x402d2f
call fcn.0041b6df
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x30]
cmp ecx, 0x10
jb 0x402de0
mov esi, eax
test eax, eax
je 0x402d6a
mov edx, eax
cmp ecx, 0x10
jae 0x402d4d
lea edx, [esp + 0x20]
cmp edx, esi
ja 0x402d6a
mov edx, eax
cmp ecx, 0x10
jae 0x402d5c
lea edx, [esp + 0x20]
mov ebx, dword [esp + 0x30]
add edx, ebx
mov ebx, dword [esp + 0x14]
cmp esi, edx
jbe 0x402d77
call fcn.0041b6df
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x1c]
cmp edx, 0xfffffffc
je 0x402d98
cmp ecx, 0x10
jae 0x402d89
lea eax, [esp + 0x20]
mov ecx, dword [esp + 0x30]
add eax, ecx
cmp esi, eax
jb 0x402d98
call fcn.0041b6df
mov edx, dword [esp + 0x10]
mov ecx, dword [edx + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x14]
add ebx, edi
push ebx
push esi
add eax, 0x44
push eax
call edx
sub eax, 0
je 0x402de9
sub eax, 1
je 0x402df1
sub eax, 2
lea ecx, [esp + 0x1c]
jne 0x402fc3
jmp 0x402fd0
lea ebx, [esp + 0x20]
mov dword [esp + 0x14], ebx
jmp 0x402cd3
lea esi, [esp + 0x20]
jmp 0x402d42
mov eax, dword [esp + 0x10]
mov byte [eax + 0x41], 0
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
cmp ecx, 0x10
jb 0x402f94
mov esi, eax
test eax, eax
je 0x402e2c
mov edx, eax
cmp ecx, 0x10
jae 0x402e13
lea edx, [esp + 0x20]
cmp edx, esi
ja 0x402e2c
mov edx, eax
cmp ecx, 0x10
jae 0x402e22
lea edx, [esp + 0x20]
mov edi, dword [esp + 0x30]
add edx, edi
cmp esi, edx
jbe 0x402e39
call fcn.0041b6df
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x1c]
cmp edx, 0xfffffffc
je 0x402e64
mov edx, eax
cmp ecx, 0x10
jae 0x402e4d
lea edx, [esp + 0x20]
mov edi, dword [esp + 0x30]
add edx, edi
cmp esi, edx
jb 0x402e64
call fcn.0041b6df
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
sub edi, esi
je 0x402ef5
cmp ecx, 0x10
jb 0x402f9d
mov esi, eax
test eax, eax
je 0x402ea3
mov edx, eax
cmp ecx, 0x10
jae 0x402e8a
lea edx, [esp + 0x20]
cmp edx, esi
ja 0x402ea3
mov edx, eax
cmp ecx, 0x10
jae 0x402e99
lea edx, [esp + 0x20]
mov ebx, dword [esp + 0x30]
add edx, ebx
cmp esi, edx
jbe 0x402eb0
call fcn.0041b6df
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x1c]
cmp edx, 0xfffffffc
je 0x402ed1
cmp ecx, 0x10
jae 0x402ec2
lea eax, [esp + 0x20]
mov ecx, dword [esp + 0x30]
add eax, ecx
cmp esi, eax
jb 0x402ed1
call fcn.0041b6df
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x4c]
push eax
push edi
push 1
push esi
call fcn.0041af67
add esp, 0x10
cmp edi, eax
jne 0x402fbf
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x41], 0
je 0x402fcc
test edi, edi
jne 0x402cc0
or edx, 0xffffffff
sub edx, dword [esp + 0x30]
cmp edx, 8
ja 0x402f24
call fcn.00432755
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
add esi, 8
cmp esi, 0xfffffffe
jbe 0x402f3d
call fcn.00432755
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
cmp ecx, esi
jae 0x402fa6
mov eax, dword [esp + 0x30]
push eax
push esi
lea ecx, [esp + 0x24]
call fcn.00404720
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
test esi, esi
jbe 0x402cc0
cmp ecx, 0x10
mov ecx, eax
jae 0x402f6b
lea ecx, [esp + 0x20]
mov edx, dword [esp + 0x30]
xor eax, eax
add ecx, edx
mov dword [ecx], eax
mov dword [ecx + 4], eax
cmp dword [esp + 0x34], 0x10
mov eax, dword [esp + 0x20]
mov dword [esp + 0x30], esi
jae 0x402f8b
lea eax, [esp + 0x20]
mov byte [eax + esi], 0
jmp 0x402cb2
lea esi, [esp + 0x20]
jmp 0x402e08
lea esi, [esp + 0x20]
jmp 0x402e7f
test esi, esi
jne 0x402f5a
mov dword [esp + 0x30], esi
cmp ecx, 0x10
jae 0x402fb7
lea eax, [esp + 0x20]
mov byte [eax], 0
jmp 0x402cb2
lea ecx, [esp + 0x1c]
call fcn.004049f0
xor al, al
jmp 0x402fd7
lea ecx, [esp + 0x1c]
call fcn.004049f0
mov al, 1
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0041a25b
mov esp, ebp
pop ebp
ret