Function at 0x403550
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x422fc8
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x42b1ec]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
mov eax, dword [0x42b1ec]
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 0x4038e5
cmp byte [ecx + 0x41], 0
je 0x4038e5
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push 0xffffffffffffffff
call edx
cmp eax, 0xffffffff
je 0x4038d8
lea esi, [esp + 0x1c]
call fcn.00402f70
mov dword [esp + 0x48], 0
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea ebx, [ebx]
cmp ecx, 0x10
jb 0x4036e3
mov ebx, eax
mov dword [esp + 0x14], ebx
test eax, eax
je 0x403607
mov edx, eax
cmp ecx, 0x10
jae 0x4035ee
lea edx, [esp + 0x20]
cmp edx, ebx
ja 0x403607
mov edx, eax
cmp ecx, 0x10
jae 0x4035fd
lea edx, [esp + 0x20]
mov esi, dword [esp + 0x30]
add edx, esi
cmp ebx, edx
jbe 0x403614
call fcn.0040d821
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x1c]
cmp edx, 0xfffffffc
je 0x40363f
mov edx, eax
cmp ecx, 0x10
jae 0x403628
lea edx, [esp + 0x20]
mov esi, dword [esp + 0x30]
add edx, esi
cmp ebx, edx
jb 0x40363f
call fcn.0040d821
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x30]
cmp ecx, 0x10
jb 0x4036f0
mov esi, eax
test eax, eax
je 0x40367a
mov edx, eax
cmp ecx, 0x10
jae 0x40365d
lea edx, [esp + 0x20]
cmp edx, esi
ja 0x40367a
mov edx, eax
cmp ecx, 0x10
jae 0x40366c
lea edx, [esp + 0x20]
mov ebx, dword [esp + 0x30]
add edx, ebx
mov ebx, dword [esp + 0x14]
cmp esi, edx
jbe 0x403687
call fcn.0040d821
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x1c]
cmp edx, 0xfffffffc
je 0x4036a8
cmp ecx, 0x10
jae 0x403699
lea eax, [esp + 0x20]
mov ecx, dword [esp + 0x30]
add eax, ecx
cmp esi, eax
jb 0x4036a8
call fcn.0040d821
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 0x4036f9
sub eax, 1
je 0x403701
sub eax, 2
lea ecx, [esp + 0x1c]
jne 0x4038d3
jmp 0x4038e0
lea ebx, [esp + 0x20]
mov dword [esp + 0x14], ebx
jmp 0x4035e3
lea esi, [esp + 0x20]
jmp 0x403652
mov eax, dword [esp + 0x10]
mov byte [eax + 0x41], 0
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
cmp ecx, 0x10
jb 0x4038a4
mov esi, eax
test eax, eax
je 0x40373c
mov edx, eax
cmp ecx, 0x10
jae 0x403723
lea edx, [esp + 0x20]
cmp edx, esi
ja 0x40373c
mov edx, eax
cmp ecx, 0x10
jae 0x403732
lea edx, [esp + 0x20]
mov edi, dword [esp + 0x30]
add edx, edi
cmp esi, edx
jbe 0x403749
call fcn.0040d821
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x1c]
cmp edx, 0xfffffffc
je 0x403774
mov edx, eax
cmp ecx, 0x10
jae 0x40375d
lea edx, [esp + 0x20]
mov edi, dword [esp + 0x30]
add edx, edi
cmp esi, edx
jb 0x403774
call fcn.0040d821
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
sub edi, esi
je 0x403805
cmp ecx, 0x10
jb 0x4038ad
mov esi, eax
test eax, eax
je 0x4037b3
mov edx, eax
cmp ecx, 0x10
jae 0x40379a
lea edx, [esp + 0x20]
cmp edx, esi
ja 0x4037b3
mov edx, eax
cmp ecx, 0x10
jae 0x4037a9
lea edx, [esp + 0x20]
mov ebx, dword [esp + 0x30]
add edx, ebx
cmp esi, edx
jbe 0x4037c0
call fcn.0040d821
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x1c]
cmp edx, 0xfffffffc
je 0x4037e1
cmp ecx, 0x10
jae 0x4037d2
lea eax, [esp + 0x20]
mov ecx, dword [esp + 0x30]
add eax, ecx
cmp esi, eax
jb 0x4037e1
call fcn.0040d821
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x4c]
push eax
push edi
push 1
push esi
call fcn.0040db19
add esp, 0x10
cmp edi, eax
jne 0x4038cf
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x41], 0
je 0x4038dc
test edi, edi
jne 0x4035d0
or edx, 0xffffffff
sub edx, dword [esp + 0x30]
cmp edx, 8
ja 0x403834
call fcn.0040c4b4
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
add esi, 8
cmp esi, 0xfffffffe
jbe 0x40384d
call fcn.0040c4b4
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
cmp ecx, esi
jae 0x4038b6
mov eax, dword [esp + 0x30]
push eax
push esi
lea ecx, [esp + 0x24]
call fcn.00403db0
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
test esi, esi
jbe 0x4035d0
cmp ecx, 0x10
mov ecx, eax
jae 0x40387b
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 0x40389b
lea eax, [esp + 0x20]
mov byte [eax + esi], 0
jmp 0x4035c2
lea esi, [esp + 0x20]
jmp 0x403718
lea esi, [esp + 0x20]
jmp 0x40378f
test esi, esi
jne 0x40386a
mov dword [esp + 0x30], esi
cmp ecx, 0x10
jae 0x4038c7
lea eax, [esp + 0x20]
mov byte [eax], 0
jmp 0x4035c2
lea ecx, [esp + 0x1c]
call fcn.00401d20
xor al, al
jmp 0x4038e7
lea ecx, [esp + 0x1c]
call fcn.00401d20
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.0040ce2f
mov esp, ebp
pop ebp
ret