Function at 0x40aa30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x4d2714]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
mov edx, ecx
mov dword [ebp - 0x24], edx
cmp ebx, 0xffffffff
jne 0x40aa61
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004235d5
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [edx + 0x24]
cmp dword [ecx], 0
push esi
je 0x40aa99
mov eax, dword [edx + 0x34]
mov ecx, dword [ecx]
mov esi, dword [eax]
add esi, ecx
cmp ecx, esi
jae 0x40aa99
dec dword [eax]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
mov byte [ecx], bl
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004235d5
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edx + 0x4c]
test eax, eax
je 0x40aab8
cmp dword [edx + 0x3c], 0
jne 0x40aacd
push eax
movsx eax, bl
push eax
call fcn.004253d2
add esp, 8
cmp eax, 0xffffffff
jne 0x40aa85
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004235d5
mov esp, ebp
pop ebp
ret 4
mov ecx, 0xf
xor eax, eax
mov byte [ebp - 0x1c], 0
mov byte [ebp - 0x28], bl
mov dword [ebp - 8], ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], 8
cmp ecx, 0x10
jae 0x40aaf3
lea eax, [ebp - 0x1c]
mov byte [eax + 8], 0
push edi
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 8]
mov edi, edi
cmp edx, 0x10
jb 0x40ad1a
mov ebx, eax
mov dword [ebp - 0x2c], ebx
test eax, eax
je 0x40ab33
mov ecx, eax
cmp edx, 0x10
jae 0x40ab1c
lea ecx, [ebp - 0x1c]
cmp ecx, ebx
ja 0x40ab33
mov ecx, eax
cmp edx, 0x10
jae 0x40ab2a
lea ecx, [ebp - 0x1c]
mov esi, dword [ebp - 0xc]
add ecx, esi
cmp ebx, ecx
jbe 0x40ab3e
call fcn.004233cd
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
cmp ecx, 0xfffffffc
je 0x40ab64
mov ecx, eax
cmp edx, 0x10
jae 0x40ab50
lea ecx, [ebp - 0x1c]
mov esi, dword [ebp - 0xc]
add ecx, esi
cmp ebx, ecx
jb 0x40ab64
call fcn.004233cd
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov edi, dword [ebp - 0xc]
cmp edx, 0x10
jb 0x40ad25
mov esi, eax
test eax, eax
je 0x40ab9a
mov ecx, eax
cmp edx, 0x10
jae 0x40ab80
lea ecx, [ebp - 0x1c]
cmp ecx, esi
ja 0x40ab9a
mov ecx, eax
cmp edx, 0x10
jae 0x40ab8e
lea ecx, [ebp - 0x1c]
mov ebx, dword [ebp - 0xc]
add ecx, ebx
mov ebx, dword [ebp - 0x2c]
cmp esi, ecx
jbe 0x40aba5
call fcn.004233cd
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
cmp ecx, 0xfffffffc
je 0x40abc3
cmp edx, 0x10
jae 0x40abb5
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0xc]
add eax, edx
cmp esi, eax
jb 0x40abc3
call fcn.004233cd
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea eax, [ebp - 0x34]
push eax
add ebx, edi
push ebx
push esi
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x24]
add eax, 0x44
push eax
call edx
test eax, eax
jl 0x40adb7
cmp eax, 1
jg 0x40ad3d
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
cmp edx, 0x10
jb 0x40ad2d
mov esi, eax
test eax, eax
je 0x40ac32
mov ecx, eax
cmp edx, 0x10
jae 0x40ac1b
lea ecx, [ebp - 0x1c]
cmp ecx, esi
ja 0x40ac32
mov ecx, eax
cmp edx, 0x10
jae 0x40ac29
lea ecx, [ebp - 0x1c]
mov edi, dword [ebp - 0xc]
add ecx, edi
cmp esi, ecx
jbe 0x40ac3d
call fcn.004233cd
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
cmp ecx, 0xfffffffc
je 0x40ac63
mov ecx, eax
cmp edx, 0x10
jae 0x40ac4f
lea ecx, [ebp - 0x1c]
mov edi, dword [ebp - 0xc]
add ecx, edi
cmp esi, ecx
jb 0x40ac63
call fcn.004233cd
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x34]
sub edi, esi
je 0x40ace4
cmp edx, 0x10
jb 0x40ad35
mov esi, eax
test eax, eax
je 0x40ac9a
mov ecx, eax
cmp edx, 0x10
jae 0x40ac83
lea ecx, [ebp - 0x1c]
cmp ecx, esi
ja 0x40ac9a
mov ecx, eax
cmp edx, 0x10
jae 0x40ac91
lea ecx, [ebp - 0x1c]
mov ebx, dword [ebp - 0xc]
add ecx, ebx
cmp esi, ecx
jbe 0x40aca5
call fcn.004233cd
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
cmp ecx, 0xfffffffc
je 0x40acc3
cmp edx, 0x10
jae 0x40acb5
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0xc]
add eax, edx
cmp esi, eax
jb 0x40acc3
call fcn.004233cd
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x4c]
push ecx
push edi
push 1
push esi
call fcn.00424914
add esp, 0x10
cmp edi, eax
jne 0x40adb7
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x24]
mov byte [ecx + 0x41], 1
lea ecx, [ebp - 0x28]
cmp dword [ebp - 0x30], ecx
jne 0x40ad99
test edi, edi
ja 0x40ab00
cmp dword [ebp - 0xc], 0x20
lea ecx, [ebp - 0x20]
jae 0x40adba
push 0
push 8
call fcn.00401b50
jmp 0x40aaf8
lea ebx, [ebp - 0x1c]
mov dword [ebp - 0x2c], ebx
jmp 0x40ab12
lea esi, [ebp - 0x1c]
jmp 0x40ab76
lea esi, [ebp - 0x1c]
jmp 0x40ac11
lea esi, [ebp - 0x1c]
jmp 0x40ac79
cmp eax, 3
jne 0x40adb7
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0x4c]
mov ecx, dword [ebp - 0x28]
push eax
push ecx
call fcn.0040a2b0
add esp, 8
test al, al
je 0x40ad79
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x20]
call fcn.00401a50
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004235d5
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x20]
or esi, 0xffffffff
call fcn.00401a50
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004235d5
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x20]
call fcn.00401a50
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004235d5
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x20]
call fcn.00401a50
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
or eax, 0xffffffff
pop ebx
call fcn.004235d5
mov esp, ebp
pop ebp
ret 4