Function at 0x403f10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40b843
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
mov eax, dword [0x40f008]
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 edx, ecx
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0xf
mov byte [ebp - 0x78], 0
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x403f52
sub edx, esi
push edx
push ecx
lea ecx, [ebp - 0x78]
call fcn.00404cb0
sub esp, 0x18
mov dword [ebp - 4], 0
mov edx, esp
mov dword [ebp - 0x18], 0x5f5f3a11
lea ecx, [ebp - 0x17]
mov word [ebp - 0x14], 0x3a
mov dword [ebp - 0x7c], esp
lea esi, [ecx + 1]
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0xf
mov byte [edx], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403f98
sub ecx, esi
lea eax, [ebp - 0x17]
push ecx
push eax
mov ecx, edx
call fcn.00404cb0
sub esp, 0x18
mov byte [ebp - 4], 1
lea eax, [ebp - 0x78]
mov ecx, esp
push eax
call fcn.00404bc0
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 0
call fcn.00402090
add esp, 0x30
mov ecx, dword [ebp - 0x84]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x88]
sub ecx, esi
imul ecx
mov ecx, 0xf
mov dword [ebp - 0x38], 0
sar edx, 2
mov ebx, edx
mov dword [ebp - 0x34], ecx
shr ebx, 0x1f
add ebx, edx
mov byte [ebp - 0x48], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], ecx
mov byte [ebp - 0x30], 0
mov edi, ecx
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], edi
mov byte [ebp - 0x60], 0
mov byte [ebp - 4], 5
je 0x404047
lea eax, [ebp - 0x48]
cmp eax, esi
je 0x404047
cmp dword [esi + 0x14], 0x10
mov eax, esi
jb 0x404038
mov eax, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x48]
push eax
call fcn.00404cb0
mov ecx, dword [ebp - 0x34]
cmp ecx, 0x10
lea eax, [ebp - 0x48]
cmovae eax, dword [ebp - 0x48]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
mov dword [ebp - 0x7c], eax
cmp ebx, 1
jbe 0x4040ab
mov ecx, dword [ebp - 0x84]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x88]
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
jbe 0x404327
lea eax, [esi + 0x18]
lea ecx, [ebp - 0x30]
cmp ecx, eax
je 0x4040ab
cmp dword [eax + 0x14], 0x10
mov ecx, eax
jb 0x40409f
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x30]
call fcn.00404cb0
cmp dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
mov esi, eax
cmp ebx, 2
jbe 0x404112
mov ecx, dword [ebp - 0x84]
mov eax, 0x2aaaaaab
mov ebx, dword [ebp - 0x88]
sub ecx, ebx
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jbe 0x404327
lea eax, [ebx + 0x30]
lea ecx, [ebp - 0x60]
cmp ecx, eax
je 0x404112
cmp dword [eax + 0x14], 0x10
mov ecx, eax
jb 0x404103
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x60]
call fcn.00404cb0
mov edi, dword [ebp - 0x4c]
cmp dword [0x40f400], 0
jne 0x404120
call fcn.00401e60
sub esi, 1
jne 0x40414e
call fcn.004023b0
call fcn.00403560
mov edx, dword [0x410580]
push ecx
mov ecx, dword [0x41057c]
call fcn.00405530
mov eax, dword [0x41057c]
add esp, 4
mov dword [0x410580], eax
mov eax, dword [ebp - 0x7c]
push 0
push 0x80
push 3
push 0
push 0
push 0x40000000
push 0x40f420
mov dword [0x40f408], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40419c
push 0
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x7c], 0
push eax
push 0x18
push 0x40f408
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0x10
jb 0x4041cf
mov ecx, dword [ebp - 0x60]
lea edx, [edi + 1]
mov eax, ecx
cmp edx, 0x1000
jb 0x4041c5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4042fb
push edx
push ecx
call fcn.0040aa56
add esp, 8
mov edx, dword [ebp - 0x1c]
cmp edx, 0x10
jb 0x404203
mov ecx, dword [ebp - 0x30]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4041f9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4042fb
push edx
push ecx
call fcn.0040aa56
add esp, 8
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0xf
mov byte [ebp - 0x30], 0
cmp edx, 0x10
jb 0x404249
mov ecx, dword [ebp - 0x48]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40423f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4042fb
push edx
push ecx
call fcn.0040aa56
add esp, 8
mov ecx, dword [ebp - 0x88]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0xf
mov byte [ebp - 0x48], 0
test ecx, ecx
je 0x4042d5
mov edx, dword [ebp - 0x84]
push ecx
call fcn.00405530
mov ecx, dword [ebp - 0x80]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x88]
add esp, 4
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, esi
shl ecx, 3
cmp ecx, 0x1000
jb 0x4042b0
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4042fb
push ecx
push esi
call fcn.0040aa56
add esp, 8
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x80], 0
mov edx, dword [ebp - 0x64]
cmp edx, 0x10
jb 0x40430b
mov ecx, dword [ebp - 0x78]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404301
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x404301
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040aa56
add esp, 8
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.0040a67e
mov esp, ebp
pop ebp
ret
call fcn.00404c80
int3