Function at 0x4039c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4189a8
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x42029c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov edi, ecx
mov dword [ebp - 0x3c], edi
cmp ebx, 0xffffffff
jne 0x4039ff
xor eax, eax
jmp 0x403c0c
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x403a28
mov eax, dword [edi + 0x34]
mov edx, dword [eax]
add edx, ecx
cmp ecx, edx
jae 0x403a28
dec dword [eax]
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
mov byte [ecx], bl
mov eax, ebx
jmp 0x403c0c
cmp dword [edi + 0x54], 0
je 0x403c09
mov ecx, dword [edi + 0x10]
lea edx, [edi + 0x48]
cmp dword [ecx], edx
jne 0x403a50
mov edx, dword [edi + 0x3c]
mov eax, dword [edi + 0x40]
mov dword [ecx], edx
mov ecx, dword [edi + 0x20]
mov dword [ecx], eax
mov edx, dword [edi + 0x30]
sub eax, eax
mov dword [edx], eax
cmp dword [edi + 0x44], 0
jne 0x403a76
mov edi, dword [edi + 0x54]
movsx eax, bl
push edi
push eax
call fcn.004063fa
add esp, 8
cmp eax, 0xffffffff
je 0x403c09
mov eax, ebx
jmp 0x403c0c
lea esi, [ebp - 0x2c]
mov byte [ebp - 0x2d], bl
call fcn.00404450
mov dword [ebp - 4], 0
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov edi, edi
mov edx, dword [ebp - 0x1c]
mov esi, eax
cmp ebx, 0x10
jae 0x403a9f
lea esi, [ebp - 0x2c]
mov eax, esi
mov ecx, dword [edi + 0x44]
mov ebx, dword [ecx]
lea edi, [ebp - 0x34]
push edi
mov edi, dword [ebp - 0x3c]
add esi, edx
push esi
push eax
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x2c]
push eax
lea edx, [ebp - 0x2d]
push edx
lea eax, [edi + 0x4c]
push eax
mov eax, dword [ebx + 0x14]
call eax
test eax, eax
js 0x403c01
cmp eax, 1
jg 0x403bb1
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov edx, eax
cmp ebx, 0x10
jae 0x403ae5
lea edx, [ebp - 0x2c]
mov esi, dword [ebp - 0x34]
sub esi, edx
je 0x403b12
cmp ebx, 0x10
jae 0x403af4
lea eax, [ebp - 0x2c]
mov ecx, dword [edi + 0x54]
push ecx
push esi
push 1
push eax
call fcn.004079c5
add esp, 0x10
cmp esi, eax
jne 0x403c01
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 0x2d]
mov byte [edi + 0x49], 1
cmp dword [ebp - 0x38], edx
jne 0x403bea
test esi, esi
jne 0x403a90
mov edx, dword [ebp - 0x1c]
cmp edx, 0x20
jae 0x403c01
or ecx, 0xffffffff
sub ecx, edx
cmp ecx, 8
jbe 0x403bf7
lea esi, [edx + 8]
cmp esi, 0xfffffffe
ja 0x403bf7
cmp ebx, esi
jae 0x403b9a
push edx
push esi
lea ecx, [ebp - 0x2c]
call fcn.004052f0
mov ebx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x2c]
test esi, esi
je 0x403a93
mov ecx, eax
cmp ebx, 0x10
jae 0x403b79
lea ecx, [ebp - 0x2c]
xor eax, eax
mov dword [ecx + edx], eax
mov dword [ecx + edx + 4], eax
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], esi
jae 0x403b91
lea eax, [ebp - 0x2c]
mov byte [eax + esi], 0
jmp 0x403a88
test esi, esi
jne 0x403b6f
mov dword [ebp - 0x1c], esi
cmp ebx, 0x10
jae 0x403ba9
lea eax, [ebp - 0x2c]
mov byte [eax], 0
jmp 0x403a88
cmp eax, 3
jne 0x403c01
mov edi, dword [edi + 0x54]
movsx edx, byte [ebp - 0x2d]
push edi
push edx
call fcn.004063fa
add esp, 8
cmp eax, 0xffffffff
je 0x403bdb
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
call fcn.004032f0
mov eax, esi
jmp 0x403c0c
lea ecx, [ebp - 0x2c]
or esi, 0xffffffff
call fcn.004032f0
mov eax, esi
jmp 0x403c0c
lea ecx, [ebp - 0x2c]
call fcn.004032f0
mov eax, dword [ebp + 8]
jmp 0x403c0c
push str.string_too_long
call fcn.00416d10
lea ecx, [ebp - 0x2c]
call fcn.004032f0
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00405d0d
mov esp, ebp
pop ebp
ret 4