Function at 0x40aeb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [ebp - 0x34], eax
mov eax, dword [edx + 4]
mov dword [ebp - 0x38], edx
test eax, eax
je 0x40aed0
mov edx, dword [eax]
test edx, edx
jne 0x40b3f7
mov dword [ebp - 0x30], 0
xor eax, eax
mov edi, 0x443610
mov ecx, 0x200
rep stosd dword es:[edi], eax
mov dword [0x443610], 0x56445644
mov dword [0x443614], 0x4f454449
mov dword [0x443618], 0x5354562d
mov byte [0x443631], 0x11
mov dword [esp + 4], 0x7ff
mov dword [esp], 0x443690
call fcn.004013c0
mov dword [esp + 4], 1
mov dword [esp], 0x4436d8
call fcn.004013c0
mov eax, dword [ebp - 0x38]
mov edx, dword [eax + 8]
xor eax, eax
call fcn.0040aa60
mov dword [esp], 0x4436dc
lea ebx, [eax + 1]
mov dword [esp + 4], ebx
call fcn.004013c0
mov edx, dword [ebp - 0x38]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], edx
call fcn.004123c0
mov ecx, dword [ebp - 0x30]
add ebx, eax
or ecx, dword [0x41f028]
jne 0x40b59d
mov dword [esp + 4], ebx
mov dword [esp], 0x4436e4
call fcn.004013c0
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 8]
call fcn.0040ad20
mov ecx, dword [ebp - 0x30]
lea edx, [eax + 0xffe]
add eax, 0x7ff
cmovs eax, edx
sar eax, 0xb
or ecx, dword [0x41f028]
lea ebx, [eax + ebx]
jne 0x40b51e
mov dword [esp + 4], ebx
mov dword [esp], 0x4436f0
call fcn.004013c0
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 8]
mov edx, dword [eax + 0x14]
xor eax, eax
call fcn.00409e40
mov dword [esp], 0x4436f4
lea edi, [eax + ebx]
mov dword [esp + 4], edi
call fcn.004013c0
mov ecx, dword [ebp - 0x38]
mov eax, dword [ecx + 8]
mov edx, dword [eax + 0x14]
mov eax, 1
mov esi, dword [edx + 8]
test esi, esi
jle 0x40b035
mov ebx, dword [edx + 0x14]
xor ecx, ecx
xor edx, edx
nop
lea esi, [esi]
mov eax, dword [ebx + edx*4]
add edx, 1
add ecx, dword [eax + 4]
cmp edx, esi
jl 0x40b010
lea eax, [ecx*4 + 4]
lea edx, [eax + 0xffe]
add eax, 0x7ff
cmovs eax, edx
sar eax, 0xb
lea edi, [eax + edi]
lea eax, [edi - 1]
mov dword [esp + 4], eax
mov dword [esp], 0x44362c
call fcn.004013c0
mov ebx, dword [ebp - 0x30]
or ebx, dword [0x41f028]
jne 0x40b4c4
mov dword [esp + 4], edi
mov ebx, edi
mov dword [esp], 0x4436d4
call fcn.004013c0
mov ecx, dword [ebp - 0x38]
mov eax, dword [ecx + 8]
mov esi, dword [eax + 8]
test esi, esi
je 0x40b0ba
mov eax, dword [eax + 0x14]
mov esi, dword [eax + 8]
mov edx, esi
sub edx, 1
js 0x40b0b5
mov eax, dword [eax + 0x14]
mov ebx, dword [eax + edx*4]
lea eax, [eax + esi*4 - 8]
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x40b0b0
jmp 0x40b5cf
mov ebx, dword [eax]
sub eax, 4
mov ecx, dword [ebx + 4]
test ecx, ecx
jne 0x40b5cf
sub edx, 1
jns 0x40b0a0
xor eax, eax
lea ebx, [eax + edi]
mov dword [esp], 0x44362c
call fcn.00401410
mov dword [esp], 0x44361c
lea eax, [ebx + eax]
mov dword [esp + 4], eax
call fcn.004013c0
mov ebx, dword [ebp - 0x30]
or ebx, dword [0x41f028]
jne 0x40b4ac
mov ecx, dword [ebp - 0x38]
mov eax, dword [ecx + 8]
mov edx, dword [eax + 0x14]
mov eax, 0x443810
call fcn.00409b00
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x40b125
mov ebx, dword [ebp - 0x34]
mov dword [esp + 8], 1
mov dword [esp + 4], 0x800
mov dword [esp], 0x443610
mov dword [esp + 0xc], ebx
call sub.cygwin1.dll_fwrite
mov eax, dword [ebp - 0x38]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x34]
call fcn.0040aa60
mov edx, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x34]
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], ecx
call fcn.004123c0
mov ebx, dword [ebp - 0x30]
or ebx, dword [0x41f028]
jne 0x40b48d
mov ecx, dword [ebp - 0x38]
lea ebx, [ebp - 0x14]
mov ecx, dword [ecx + 8]
mov eax, dword [ecx + 8]
mov dword [ebp - 0x24], ecx
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.004013f0
lea eax, [ebp - 0x12]
mov dword [esp], eax
mov dword [esp + 4], 0
call fcn.004013f0
mov eax, dword [ebp - 0x24]
call fcn.0040ad20
sub eax, 1
mov dword [esp + 4], eax
lea eax, [ebp - 0x10]
mov dword [esp], eax
call fcn.004013c0
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x40b1ca
mov edx, dword [ebp - 0x34]
mov dword [esp + 8], 1
mov dword [esp + 4], 8
mov dword [esp], ebx
mov dword [esp + 0xc], edx
call sub.cygwin1.dll_fwrite
mov ebx, dword [ebp - 0x24]
mov eax, dword [ebx + 8]
test eax, eax
jle 0x40b38f
lea esi, [eax*4 + 8]
xor ebx, ebx
jmp 0x40b1e5
add esi, eax
lea eax, [ebp - 0x14]
mov dword [esp], eax
mov dword [esp + 4], esi
call fcn.004013c0
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40b21d
mov edx, dword [ebp - 0x34]
lea ecx, [ebp - 0x14]
mov dword [esp + 8], 1
mov dword [esp + 4], 4
mov dword [esp], ecx
mov dword [esp + 0xc], edx
call sub.cygwin1.dll_fwrite
mov eax, dword [ebp - 0x24]
mov edx, ebx
add ebx, 1
call fcn.0040acc0
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + 8]
cmp ebx, edx
jl 0x40b1e3
test edx, edx
jle 0x40b38f
mov dword [ebp - 0x20], 0
mov edx, dword [ebp - 0x20]
mov esi, 1
mov eax, dword [ebp - 0x24]
call fcn.0040ac80
mov dword [ebp - 0x28], 1
test eax, eax
mov ecx, eax
je 0x40b27c
lea esi, [eax + 0x7f7]
mov eax, 0x80808081
imul esi
add edx, esi
sar edx, 0xa
sar esi, 0x1f
sub edx, esi
mov dword [ebp - 0x28], edx
mov esi, edx
mov edx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x20]
mov eax, dword [edx + 4]
mov edx, ecx
sar edx, 0x1f
mov eax, dword [eax + ebx*4]
lea ebx, [ebp - 0x12]
mov byte [ebp - 0x13], 0
mov dword [esp], ebx
mov dword [ebp - 0x2c], eax
mov eax, ecx
mov ecx, esi
idiv dword [ebp - 0x28]
mov byte [ebp - 0x14], cl
mov dword [ebp - 0x3c], eax
mov dword [esp + 4], eax
call fcn.004013f0
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40b2d9
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x14]
mov dword [esp + 8], 1
mov dword [esp + 4], 4
mov dword [esp], edx
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
mov eax, dword [ebp - 0x3c]
test eax, eax
jle 0x40b37c
mov ecx, dword [ebp - 0x24]
xor esi, esi
mov eax, dword [ecx + 0x14]
mov dword [esp], eax
call fcn.00401130
imul eax, dword [ebp - 0x28]
mov edx, eax
mov eax, dword [ebp - 0x2c]
call fcn.0040ad70
mov ebx, eax
jmp 0x40b308
mov ebx, edi
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0x14]
mov dword [esp], eax
call fcn.00401130
lea edx, [esi + 2]
imul eax, dword [ebp - 0x28]
imul edx, eax
mov eax, dword [ebp - 0x2c]
call fcn.0040ad70
lea ecx, [ebp - 0x14]
mov edi, eax
mov eax, dword [ebx]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004013c0
test edi, edi
je 0x40b347
mov eax, dword [ebx + 0x10]
cmp eax, dword [edi + 0x10]
je 0x40b34b
or byte [ebp - 0x14], 0x80
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40b374
mov ebx, dword [ebp - 0x34]
lea eax, [ebp - 0x14]
mov dword [esp + 8], 1
mov dword [esp + 4], 4
mov dword [esp], eax
mov dword [esp + 0xc], ebx
call sub.cygwin1.dll_fwrite
add esi, 1
cmp dword [ebp - 0x3c], esi
jg 0x40b306
mov ecx, dword [ebp - 0x24]
add dword [ebp - 0x20], 1
mov edx, dword [ebp - 0x20]
cmp edx, dword [ecx + 8]
jl 0x40b243
mov eax, dword [ebp - 0x24]
call fcn.0040ad20
neg eax
mov esi, eax
and esi, 0x7ff
jne 0x40b410
mov eax, dword [ebp - 0x30]
or eax, dword [0x41f028]
je 0x40b3d0
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 4]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x34]
call fcn.00409e40
mov ecx, dword [ebp - 0x38]
mov eax, dword [ecx + 4]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x34]
call fcn.0040a060
mov ebx, dword [ebp - 0x38]
mov eax, dword [ebx + 8]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 0x34]
call fcn.00409e40
mov eax, dword [ebx + 8]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 0x34]
call fcn.0040a060
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [eax + 4]
mov eax, dword [eax + 4]
mov edi, dword [eax + 8]
test edi, edi
setne al
movzx eax, al
mov dword [ebp - 0x30], eax
jmp 0x40aed7
cmp esi, 7
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
jle 0x40b45f
mov ebx, esi
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40b44e
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x14]
mov dword [esp + 8], 1
mov dword [esp + 4], 8
mov dword [esp], edx
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
sub ebx, 8
cmp ebx, 7
jg 0x40b425
and esi, 7
je 0x40b3a3
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40b3a3
mov ecx, dword [ebp - 0x34]
lea ebx, [ebp - 0x14]
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0xc], ecx
call sub.cygwin1.dll_fwrite
jmp 0x40b3a3
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.004123c0
jmp 0x40b15c
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 4]
mov edx, dword [eax + 8]
mov eax, 0x443710
call fcn.00409b00
jmp 0x40b0e8
mov dword [esp + 4], edi
mov dword [esp], 0x4436d0
call fcn.004013c0
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 4]
mov eax, dword [eax + 8]
mov esi, dword [eax + 8]
mov ecx, esi
sub ecx, 1
js 0x40b515
mov eax, dword [eax + 0x14]
mov ebx, dword [eax + ecx*4]
lea eax, [eax + esi*4 - 8]
mov edx, dword [ebx + 4]
test edx, edx
je 0x40b510
jmp 0x40b5e5
mov ebx, dword [eax]
sub eax, 4
mov edx, dword [ebx + 4]
test edx, edx
jne 0x40b5e5
sub ecx, 1
jns 0x40b500
xor eax, eax
add edi, eax
jmp 0x40b05a
mov dword [esp + 4], ebx
mov dword [esp], 0x4436e8
call fcn.004013c0
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 4]
mov edx, dword [eax + 8]
xor eax, eax
call fcn.00409e40
mov dword [esp], 0x4436ec
lea edi, [eax + ebx]
mov dword [esp + 4], edi
call fcn.004013c0
mov ecx, dword [ebp - 0x38]
mov eax, dword [ecx + 4]
mov edx, dword [eax + 8]
mov eax, 1
mov esi, dword [edx + 8]
test esi, esi
jle 0x40b595
mov ebx, dword [edx + 0x14]
xor ecx, ecx
xor edx, edx
lea esi, [esi]
mov eax, dword [ebx + edx*4]
add edx, 1
add ecx, dword [eax + 4]
cmp edx, esi
jl 0x40b570
lea eax, [ecx*4 + 4]
lea edx, [eax + 0xffe]
add eax, 0x7ff
cmovs eax, edx
sar eax, 0xb
lea ebx, [eax + edi]
jmp 0x40afbc
mov dword [esp + 4], ebx
mov dword [esp], 0x4436e0
call fcn.004013c0
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], 1
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.004123c0
add ebx, eax
jmp 0x40af7e
mov eax, dword [ebx + 0x18]
lea edx, [ecx + ecx*8 - 9]
shl edx, 4
mov eax, dword [eax + edx + 4]
add eax, 1
jmp 0x40b0b7
mov eax, dword [ebx + 0x18]
lea edx, [edx + edx*8 - 9]
shl edx, 4
mov eax, dword [eax + edx + 4]
add eax, 1
add edi, eax
jmp 0x40b05a