Function at 0x404ba0
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4402b7
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x4543f8]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push esi
push edi
mov eax, dword [0x4543f8]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor esi, esi
mov ebx, ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], esi
cmp eax, 0xffffffff
jne 0x404bf8
xor eax, eax
jmp 0x404d66
mov ecx, dword [ebx + 0x24]
cmp dword [ecx], esi
je 0x404c1f
mov edx, dword [ecx]
mov ecx, dword [ebx + 0x34]
mov edi, dword [ecx]
add edi, edx
cmp edx, edi
jae 0x404c1f
dec dword [ecx]
mov ebx, dword [ebx + 0x24]
mov ecx, dword [ebx]
lea edx, [ecx + 1]
mov dword [ebx], edx
mov byte [ecx], al
jmp 0x404d66
mov ecx, dword [ebx + 0x4c]
cmp ecx, esi
je 0x404d63
cmp dword [ebx + 0x3c], esi
jne 0x404c4d
movsx eax, al
push ecx
push eax
call fcn.00412800
add esp, 8
cmp eax, 0xffffffff
je 0x404d63
mov eax, dword [ebp + 8]
jmp 0x404d66
push esi
lea ecx, [esp + 0x6c]
push ecx
mov ecx, 8
mov byte [esp + 0x1e], al
call fcn.00406680
mov dword [esp + 0x98], esi
lea esi, [esp + 0x38]
lea ecx, [esp + 0x68]
call fcn.00404270
mov edi, eax
lea esi, [esp + 0x44]
lea ecx, [esp + 0x68]
mov byte [esp + 0x98], 1
call fcn.00404270
mov dword [esp + 0x1c], eax
mov esi, edi
mov byte [esp + 0x98], 2
call fcn.00407880
mov edx, dword [esp + 0x80]
mov esi, dword [esp + 0x1c]
mov edi, eax
mov dword [esp + 0x28], edx
call fcn.00407880
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea esi, [esp + 0x2c]
push esi
mov esi, dword [esp + 0x2c]
add esi, edi
push esi
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x27]
push eax
lea eax, [esp + 0x2a]
push eax
lea eax, [ebx + 0x44]
push eax
call edx
push 3
lea ecx, [esp + 0x28]
mov esi, eax
mov byte [esp + 0x9c], 1
call fcn.0040f1f0
lea edi, [esp + 0x44]
mov byte [esp + 0x98], 3
call fcn.00401190
lea ecx, [esp + 0x24]
mov byte [esp + 0x98], 1
call fcn.0040f230
push 3
lea ecx, [esp + 0x20]
mov byte [esp + 0x9c], 0
call fcn.0040f1f0
lea edi, [esp + 0x38]
mov byte [esp + 0x98], 4
call fcn.00401190
lea ecx, [esp + 0x1c]
mov byte [esp + 0x98], 0
call fcn.0040f230
test esi, esi
jge 0x404d94
lea ecx, [esp + 0x68]
mov dword [esp + 0x98], 0xffffffff
call fcn.00404200
or eax, 0xffffffff
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00411660
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [esp + 0x20]
cmp esi, 1
jg 0x405031
lea esi, [esp + 0x50]
lea ecx, [esp + 0x68]
call fcn.00404270
mov esi, eax
mov byte [esp + 0x98], 5
call fcn.00407880
mov ebx, dword [esp + 0x2c]
push 3
lea ecx, [esp + 0x38]
sub ebx, eax
mov byte [esp + 0x9c], 0
call fcn.0040f1f0
lea edi, [esp + 0x50]
mov byte [esp + 0x98], 6
call fcn.00401190
lea ecx, [esp + 0x34]
mov byte [esp + 0x98], 0
call fcn.0040f230
test ebx, ebx
jbe 0x404e36
lea esi, [esp + 0x5c]
lea ecx, [esp + 0x68]
call fcn.00404270
mov byte [esp + 0x98], 7
or dword [esp + 0x18], 1
mov esi, eax
call fcn.00407880
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 0x4c]
push edx
push ebx
push 1
push eax
call fcn.00413b80
add esp, 0x10
mov byte [esp + 0x17], 1
cmp ebx, eax
jne 0x404e3b
mov byte [esp + 0x17], 0
mov dword [esp + 0x98], 0
test byte [esp + 0x18], 1
je 0x404e5b
and dword [esp + 0x18], 0xfffffffe
lea edi, [esp + 0x5c]
call fcn.004063a0
cmp byte [esp + 0x17], 0
jne 0x404d4f
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x16]
mov byte [eax + 0x41], 1
cmp dword [esp + 0x30], ecx
jne 0x40506d
test ebx, ebx
ja 0x404f1d
mov ecx, dword [esp + 0x80]
cmp ecx, 0x20
jae 0x404d4f
or edx, 0xffffffff
sub edx, ecx
cmp edx, 8
ja 0x404eaa
call fcn.00410870
mov ecx, dword [esp + 0x80]
lea esi, [ecx + 8]
cmp esi, 0xfffffffe
jbe 0x404ebe
call fcn.00410870
mov ecx, dword [esp + 0x80]
mov eax, dword [esp + 0x84]
cmp eax, esi
jae 0x40500d
push ecx
push esi
lea ecx, [esp + 0x70]
call fcn.0040b220
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x80]
test esi, esi
jbe 0x404f1d
mov edx, dword [esp + 0x70]
cmp eax, 0x10
jae 0x404ef7
lea edx, [esp + 0x70]
xor eax, eax
add ecx, edx
mov dword [ecx], eax
mov dword [ecx + 4], eax
cmp dword [esp + 0x84], 0x10
mov eax, dword [esp + 0x70]
mov dword [esp + 0x80], esi
jae 0x404f19
lea eax, [esp + 0x70]
mov byte [eax + esi], 0
lea esi, [esp + 0x38]
lea ecx, [esp + 0x68]
call fcn.00404270
mov edi, eax
lea esi, [esp + 0x44]
lea ecx, [esp + 0x68]
mov byte [esp + 0x98], 1
call fcn.00404270
mov ebx, eax
mov esi, edi
mov byte [esp + 0x98], 2
call fcn.00407880
mov edi, eax
mov eax, dword [esp + 0x80]
mov esi, ebx
mov dword [esp + 0x28], eax
call fcn.00407880
mov edx, dword [esp + 0x20]
mov ecx, dword [edx + 0x3c]
mov esi, dword [ecx]
lea ebx, [esp + 0x2c]
push ebx
mov ebx, dword [esp + 0x2c]
add ebx, edi
push ebx
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x27]
push eax
lea eax, [esp + 0x2a]
push eax
lea eax, [edx + 0x44]
mov edx, dword [esi + 0x14]
push eax
call edx
push 3
lea ecx, [esp + 0x28]
mov esi, eax
mov byte [esp + 0x9c], 1
call fcn.0040f1f0
lea edi, [esp + 0x44]
mov byte [esp + 0x98], 3
call fcn.00401190
lea ecx, [esp + 0x24]
mov byte [esp + 0x98], 1
call fcn.0040f230
push 3
lea ecx, [esp + 0x20]
mov byte [esp + 0x9c], 0
call fcn.0040f1f0
lea edi, [esp + 0x38]
mov byte [esp + 0x98], 4
call fcn.00401190
lea ecx, [esp + 0x1c]
mov byte [esp + 0x98], 0
call fcn.0040f230
test esi, esi
jge 0x404d90
jmp 0x404d4f
test esi, esi
jne 0x404ee8
cmp eax, 0x10
mov eax, dword [esp + 0x70]
mov dword [esp + 0x80], esi
jae 0x405029
lea eax, [esp + 0x70]
mov byte [eax], 0
jmp 0x404f1d
cmp esi, 3
jne 0x404d4f
mov eax, dword [ebx + 0x4c]
mov cl, byte [esp + 0x16]
call fcn.004021c0
test al, al
je 0x40504f
mov esi, dword [ebp + 8]
jmp 0x405052
or esi, 0xffffffff
lea ecx, [esp + 0x68]
mov dword [esp + 0x98], 0xffffffff
call fcn.00404200
mov eax, esi
jmp 0x404d66
lea ecx, [esp + 0x68]
mov dword [esp + 0x98], 0xffffffff
call fcn.00404200
mov eax, dword [ebp + 8]
jmp 0x404d66