Function at 0x404c00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x422768
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebx
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
push esi
mov edx, ecx
push edi
mov dword [esp + 0x10], edx
jne 0x404c45
xor eax, eax
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
xor esi, esi
cmp ecx, esi
je 0x404c80
mov eax, dword [edx + 0x34]
mov edi, dword [eax]
add edi, ecx
cmp ecx, edi
jae 0x404c80
add dword [eax], 0xffffffff
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
mov byte [ecx], bl
mov eax, ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edx + 0x4c]
cmp eax, esi
je 0x405004
cmp dword [edx + 0x3c], esi
jne 0x404cbc
push eax
movsx eax, bl
push eax
call fcn.0040b95a
add esp, 8
cmp eax, 0xffffffff
je 0x405004
mov eax, ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, 0xf
mov dword [esp + 0x3c], ecx
xor eax, eax
cmp ecx, 0x10
mov byte [esp + 0x28], 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x38], esi
mov byte [esp + 0x14], bl
mov dword [esp + 0x2c], eax
mov dword [esp + 0x38], 8
jae 0x404ced
lea eax, [esp + 0x28]
mov byte [eax + 8], 0
mov dword [esp + 0x4c], esi
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x3c]
lea ecx, [ecx]
cmp edx, 0x10
jb 0x404f56
test eax, eax
mov ebx, eax
mov dword [esp + 0x18], ebx
je 0x404d37
cmp edx, 0x10
mov ecx, eax
jae 0x404d1e
lea ecx, [esp + 0x28]
cmp ecx, ebx
ja 0x404d37
cmp edx, 0x10
mov ecx, eax
jae 0x404d2d
lea ecx, [esp + 0x28]
mov esi, dword [esp + 0x38]
add ecx, esi
cmp ebx, ecx
jbe 0x404d44
call fcn.0040aaa3
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x24]
cmp ecx, 0xfffffffe
je 0x404d6f
cmp edx, 0x10
mov ecx, eax
jae 0x404d58
lea ecx, [esp + 0x28]
mov esi, dword [esp + 0x38]
add ecx, esi
cmp ebx, ecx
jb 0x404d6f
call fcn.0040aaa3
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
cmp edx, 0x10
mov edi, dword [esp + 0x38]
jb 0x404f63
test eax, eax
mov esi, eax
je 0x404daa
cmp edx, 0x10
mov ecx, eax
jae 0x404d8d
lea ecx, [esp + 0x28]
cmp ecx, esi
ja 0x404daa
cmp edx, 0x10
mov ecx, eax
jae 0x404d9c
lea ecx, [esp + 0x28]
mov ebx, dword [esp + 0x38]
add ecx, ebx
cmp esi, ecx
mov ebx, dword [esp + 0x18]
jbe 0x404db7
call fcn.0040aaa3
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x24]
cmp ecx, 0xfffffffe
je 0x404dd8
cmp edx, 0x10
jae 0x404dc9
lea eax, [esp + 0x28]
mov edx, dword [esp + 0x38]
add eax, edx
cmp esi, eax
jb 0x404dd8
call fcn.0040aaa3
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea eax, [esp + 0x1c]
push eax
add ebx, edi
push ebx
push esi
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x25]
push eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
add eax, 0x44
push eax
call edx
test eax, eax
jl 0x404ff3
cmp eax, 1
jg 0x404f7e
mov edx, dword [esp + 0x3c]
cmp edx, 0x10
mov eax, dword [esp + 0x28]
jb 0x404f6c
test eax, eax
mov esi, eax
je 0x404e52
cmp edx, 0x10
mov ecx, eax
jae 0x404e39
lea ecx, [esp + 0x28]
cmp ecx, esi
ja 0x404e52
cmp edx, 0x10
mov ecx, eax
jae 0x404e48
lea ecx, [esp + 0x28]
mov edi, dword [esp + 0x38]
add ecx, edi
cmp esi, ecx
jbe 0x404e5f
call fcn.0040aaa3
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x24]
cmp ecx, 0xfffffffe
je 0x404e8a
cmp edx, 0x10
mov ecx, eax
jae 0x404e73
lea ecx, [esp + 0x28]
mov edi, dword [esp + 0x38]
add ecx, edi
cmp esi, ecx
jb 0x404e8a
call fcn.0040aaa3
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x1c]
sub edi, esi
je 0x404f1b
cmp edx, 0x10
jb 0x404f75
test eax, eax
mov esi, eax
je 0x404ec9
cmp edx, 0x10
mov ecx, eax
jae 0x404eb0
lea ecx, [esp + 0x28]
cmp ecx, esi
ja 0x404ec9
cmp edx, 0x10
mov ecx, eax
jae 0x404ebf
lea ecx, [esp + 0x28]
mov ebx, dword [esp + 0x38]
add ecx, ebx
cmp esi, ecx
jbe 0x404ed6
call fcn.0040aaa3
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x24]
cmp ecx, 0xfffffffe
je 0x404ef7
cmp edx, 0x10
jae 0x404ee8
lea eax, [esp + 0x28]
mov edx, dword [esp + 0x38]
add eax, edx
cmp esi, eax
jb 0x404ef7
call fcn.0040aaa3
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x4c]
push ecx
push edi
push 1
push esi
call fcn.0040bbf8
add esp, 0x10
cmp edi, eax
jne 0x404ff3
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x10]
mov byte [ecx + 0x41], 1
lea ecx, [esp + 0x14]
cmp dword [esp + 0x20], ecx
jne 0x404fcb
test edi, edi
ja 0x404d00
cmp dword [esp + 0x38], 0x20
jae 0x404ff3
push 0
push 8
lea ecx, [esp + 0x2c]
call fcn.00405950
jmp 0x404cf5
lea ebx, [esp + 0x28]
mov dword [esp + 0x18], ebx
jmp 0x404d13
lea esi, [esp + 0x28]
jmp 0x404d82
lea esi, [esp + 0x28]
jmp 0x404e2e
lea esi, [esp + 0x28]
jmp 0x404ea5
cmp eax, 3
jne 0x404ff3
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x4c]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.00403220
add esp, 8
test al, al
je 0x404fa1
mov esi, dword [ebp + 8]
jmp 0x404fa4
or esi, 0xffffffff
mov dword [esp + 0x4c], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.00401cb0
mov eax, esi
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [esp + 0x4c], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.00401cb0
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [esp + 0x4c], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.00401cb0
mov ecx, dword [esp + 0x44]
pop edi
pop esi
or eax, 0xffffffff
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4