Function at 0x403780
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44a3a9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
xor eax, eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 8]
cmp ecx, 0xffffffff
mov dword [ebp - 0x28], eax
sete al
mov dword [ebp - 0x14], ebx
test al, al
je 0x4037cf
xor eax, eax
cmp ecx, 0xffffffff
pop ebx
cmovne eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx + 0x20]
push esi
push edi
mov edx, dword [eax]
test edx, edx
je 0x4037ff
mov esi, dword [ebx + 0x30]
mov edi, dword [esi]
lea eax, [edi + edx]
cmp edx, eax
jae 0x4037ff
lea eax, [edi - 1]
mov dword [esi], eax
mov ecx, dword [ebx + 0x20]
mov ebx, dword [ebp + 8]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
mov byte [edx], bl
jmp 0x403aa3
cmp dword [ebx + 0x4c], 0
jne 0x40381b
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
mov esi, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [esi], eax
jne 0x40383c
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebx + 0x54]
mov dword [esi], ecx
sub edx, ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov ecx, dword [ebp + 8]
mov dword [eax], edx
cmp dword [ebx + 0x38], 0
jne 0x40386f
push dword [ebx + 0x4c]
movsx eax, cl
push eax
call fcn.0040e1e0
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, dword [ebp + 8]
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
push 0
mov byte [ebp - 0xd], cl
lea ecx, [ebp - 0x74]
push 8
call fcn.00402d50
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x74]
call fcn.00404560
mov edi, eax
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x74]
call fcn.00404560
mov esi, eax
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.00405140
mov edi, dword [ebp - 0x60]
mov ecx, esi
mov ebx, eax
call fcn.00405140
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x38]
add edx, 0x40
mov dword [ebp - 0x24], edx
lea edx, [ebp - 0x1c]
push edx
lea edx, [edi + ebx]
mov esi, dword [ecx]
push edx
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0xd]
push eax
push dword [ebp - 0x24]
call dword [esi + 0x1c]
lea ecx, [ebp - 0x34]
mov esi, eax
call fcn.00401700
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0
call fcn.00401700
test esi, esi
js 0x403a98
nop
cmp esi, 1
jg 0x403ac7
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x74]
call fcn.00404560
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.00405140
mov esi, dword [ebp - 0x1c]
lea ecx, [ebp - 0x4c]
sub esi, eax
call fcn.00401700
test esi, esi
je 0x403970
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x74]
call fcn.00404560
mov byte [ebp - 4], 4
mov ecx, eax
mov ebx, dword [ebp - 0x18]
or ebx, 1
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x28], ebx
call fcn.00405140
mov edi, dword [ebp - 0x14]
push dword [edi + 0x4c]
push esi
push 1
push eax
call fcn.00419ab0
add esp, 0x10
cmp esi, eax
je 0x403976
mov byte [ebp - 0xe], 1
jmp 0x40397a
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
mov byte [ebp - 0xe], 0
mov dword [ebp - 4], 0
test bl, 1
je 0x403994
and ebx, 0xfffffffe
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x18], ebx
call fcn.00401700
cmp byte [ebp - 0xe], 0
jne 0x403a98
lea eax, [ebp - 0xd]
mov byte [edi + 0x3d], 1
cmp dword [ebp - 0x20], eax
jne 0x403ac2
test esi, esi
jne 0x403a24
mov ecx, dword [ebp - 0x60]
cmp ecx, 0x20
jae 0x403a98
mov eax, ecx
not eax
cmp eax, 8
jbe 0x403ab8
lea esi, [ecx + 8]
cmp esi, 0xfffffffe
ja 0x403ab8
mov edx, dword [ebp - 0x5c]
cmp edx, esi
jae 0x4039ea
push ecx
push esi
lea ecx, [ebp - 0x74]
call fcn.00405760
jmp 0x4039fe
test esi, esi
jne 0x403a05
cmp edx, 0x10
mov dword [ebp - 0x60], esi
lea eax, [ebp - 0x70]
cmovae eax, dword [ebp - 0x70]
mov byte [eax], 0
mov ecx, dword [ebp - 0x60]
test esi, esi
je 0x403a24
push 0
push 8
push ecx
lea ecx, [ebp - 0x74]
call fcn.004052d0
cmp dword [ebp - 0x5c], 0x10
lea eax, [ebp - 0x70]
mov dword [ebp - 0x60], esi
cmovae eax, dword [ebp - 0x70]
mov byte [eax + esi], 0
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x74]
call fcn.00404560
mov edi, eax
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x74]
call fcn.00404560
mov esi, eax
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.00405140
mov edi, dword [ebp - 0x60]
mov ecx, esi
mov ebx, eax
call fcn.00405140
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x1c]
push edx
lea edx, [edi + ebx]
push edx
mov ecx, dword [ecx + 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
mov esi, dword [ecx]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0xd]
push eax
push dword [ebp - 0x24]
call dword [esi + 0x1c]
lea ecx, [ebp - 0x34]
mov esi, eax
call fcn.00401700
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0
call fcn.00401700
test esi, esi
jns 0x403900
or ebx, 0xffffffff
lea ecx, [ebp - 0x74]
call fcn.00402c90
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
push str.string_too_long
call fcn.00406930
mov ebx, dword [ebp + 8]
jmp 0x403a9b
cmp esi, 3
jne 0x403a98
mov eax, dword [ebp - 0x14]
push dword [eax + 0x4c]
movsx eax, byte [ebp - 0xd]
push eax
call fcn.0040e1e0
or ecx, 0xffffffff
add esp, 8
cmp eax, ecx
cmovne ecx, dword [ebp + 8]
mov ebx, ecx
jmp 0x403a9b