Function at 0x401250
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 3
and esp, 0xfffffff8
add esp, 4
sub esp, 0xb4
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
xor eax, eax
mov dl, 1
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp + 8]
mov byte [ebp - 0x18], dl
cmp ebx, 3
mov dword [ebp - 0x7c], 0x407280
mov dword [ebp - 0x78], 0x200
jl 0x4012a4
cmp ebx, 4
jle 0x4012bb
add esp, 0xfffffff8
mov dword [esp], 0x409040
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x4014d5
mov esi, dword [ebp + 0xc]
add esp, 0xfffffff8
mov eax, dword [esi + 4]
mov dword [esp], eax
call sub.MSVCRT.dll__strupr
mov eax, dword [esi + 8]
mov dword [esp], eax
call sub.MSVCRT.dll__strupr
mov eax, dword [esi + 4]
mov edx, dword [esi + 8]
add esp, 8
cmp ebx, 4
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x48], edx
je 0x402053
mov eax, dword [ebp - 0x3c]
and eax, 2
mov dword [ebp - 0x24], eax
jne 0x401329
mov eax, dword [ebp - 0x3c]
test al, 1
je 0x401315
add esp, 0xfffffff8
mov dword [esp], 0x4090a0
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x40133b
add esp, 0xfffffff8
mov dword [esp], 0x4090c0
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x40133b
add esp, 0xfffffff8
mov dword [esp], 0x409080
call sub.MSVCRT.dll_printf
add esp, 8
mov eax, dword [ebp - 0x3c]
and eax, 0x20
mov dword [ebp - 0x34], eax
jne 0x401375
mov eax, dword [ebp - 0x3c]
test al, 0x10
je 0x401361
add esp, 0xfffffff8
mov dword [esp], 0x409100
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401387
add esp, 0xfffffff8
mov dword [esp], 0x409120
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401387
add esp, 0xfffffff8
mov dword [esp], 0x4090e0
call sub.MSVCRT.dll_printf
add esp, 8
add esp, 0xffffffe4
xor eax, eax
mov edx, dword [ebp - 0x48]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0x10000000
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x402035
cmp esi, 0xffffffff
je 0x402035
add esp, 0xfffffff8
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x4c], eax
test eax, eax
ja 0x401410
add esp, 0xfffffff8
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], 0x409160
call sub.MSVCRT.dll_printf
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40147a
push edi
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0xffffffe4
xor eax, eax
mov edx, dword [ebp - 0xc]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0x10000000
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
jne 0x401516
add esp, 0xfffffff8
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], 0x409140
call sub.MSVCRT.dll_printf
add esp, 8
test esi, esi
jne 0x401407
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40148f
add esp, 0xfffffff8
mov dword [esp], eax
call sub.MSVCRT.dll_free
add esp, 8
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4014a4
add esp, 0xfffffff8
mov dword [esp], eax
call sub.MSVCRT.dll_free
add esp, 8
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x4014b9
add esp, 0xfffffff8
mov dword [esp], eax
call sub.MSVCRT.dll_free
add esp, 8
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4014ce
add esp, 0xfffffff8
mov dword [esp], eax
call sub.MSVCRT.dll_free
add esp, 8
mov al, byte [ebp - 0x18]
test al, al
je 0x4014f3
add esp, 0xfffffff8
mov dword [esp], 0x409500
call sub.MSVCRT.dll_printf
mov dword [esp], 1
call sub.MSVCRT.dll_exit
add esp, 8
add esp, 0xfffffff8
mov dword [esp], 0x409520
call sub.MSVCRT.dll_printf
add esp, 8
xor eax, eax
mov ebx, dword [esp]
mov esi, dword [esp + 4]
mov edi, dword [esp + 8]
mov esp, ebp
pop ebp
ret
cmp esi, 0xffffffff
je 0x40145d
add esp, 0xfffffff8
mov dword [esp], 0x409180
call sub.MSVCRT.dll_printf
add esp, 0xfffffff8
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 0xffffffec
lea edx, [ebp - 0x74]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x20
mov edx, dword [ebp - 0x7c]
mov edi, eax
mov dword [esp + 4], edx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor edx, edx
mov ah, 1
nop
lea esi, [esi]
mov al, byte [edx + 0x407280]
mov cl, byte [edx + 0x405020]
inc edx
cmp al, cl
je 0x401593
xor ah, ah
cmp edx, 6
jb 0x401580
test ah, ah
jne 0x40202d
mov ebx, edi
mov eax, dword [ebp - 0x74]
cmp eax, 0x20
jne 0x401625
add esp, 0xfffffff0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0xe0
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 0xffffffec
lea edx, [ebp - 0x74]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x20
mov edx, dword [ebp - 0x7c]
mov ebx, eax
mov dword [esp + 4], edx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor edx, edx
mov ah, 1
mov al, byte [edx + 0x407280]
mov cl, byte [edx + 0x405020]
inc edx
cmp al, cl
je 0x401615
xor ah, ah
cmp edx, 6
jb 0x401602
test ah, ah
je 0x4015a2
mov edi, ebx
mov eax, dword [ebp - 0x74]
jmp 0x401627
mov edi, ebx
cmp eax, 0x20
je 0x401643
add esp, 0xfffffff8
mov dword [esp], 0x4091a0
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401f9e
add esp, 0xfffffff8
mov dword [esp + 4], edi
mov dword [esp], 0x4091c0
call sub.MSVCRT.dll_printf
add esp, 8
push ecx
mov eax, dword [ebp - 0x7c]
mov cl, byte [eax + 0xe]
mov eax, dword [ebp - 0x78]
shl eax, cl
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x7c]
mov ebx, dword [eax + 8]
mov dword [ebp - 0x70], ebx
mov ebx, dword [eax + 0x10]
mov dword [ebp - 0x6c], ebx
mov ebx, dword [eax + 0x14]
mov dword [ebp - 0x68], ebx
mov ebx, dword [eax + 0x18]
shl ebx, 4
mov dword [ebp - 0x64], ebx
mov ebx, dword [eax + 0x1c]
shl ebx, 4
mov dword [ebp - 0x60], ebx
pop ecx
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x20], edx
add edx, eax
cmp edx, ecx
ja 0x401f85
mov ebx, dword [ebp - 0x68]
mov edx, dword [ebp - 0x60]
mov dword [ebp - 8], edi
mov edi, ebx
add edi, edx
cmp edi, ecx
mov edi, dword [ebp - 8]
ja 0x401f85
test eax, eax
je 0x401f85
sub ecx, eax
add ebx, edi
sub ecx, edx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x70], ecx
mov ecx, dword [ebp - 0x20]
add ecx, edi
cmp edx, eax
mov dword [ebp - 0x6c], ecx
jb 0x4016f5
add esp, 0xfffffff8
mov dword [esp], 0x409200
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401f9e
add esp, 0xfffffff8
mov dword [esp], eax
call sub.MSVCRT.dll_malloc
add esp, 0xfffffff8
xor edx, edx
mov ecx, dword [ebp - 0x6c]
mov dword [esp + 0xc], edx
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], esi
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 0xffffffec
lea eax, [ebp - 0x74]
mov edx, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 0xfffffff0
mov eax, dword [ebp - 0x74]
mov edx, dword [ebp - 0x6c]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], 0x409220
call sub.MSVCRT.dll_printf
mov dword [esp + 0xc], 0
mov eax, dword [ebp - 0x64]
mov edx, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], 0x409260
call fcn.00402080
mov eax, dword [ebp - 0x60]
add esp, 8
add eax, 0x10
mov dword [esp], eax
call sub.MSVCRT.dll_malloc
add esp, 0xfffffff8
xor edx, edx
mov ecx, dword [ebp - 0x68]
mov dword [esp + 0xc], edx
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], esi
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 0xffffffec
lea eax, [ebp - 0x74]
mov edx, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x14]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 0xfffffff0
mov eax, dword [ebp - 0x74]
mov edx, dword [ebp - 0x68]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], 0x409280
call sub.MSVCRT.dll_printf
add esp, 0x10
mov eax, dword [ebp - 0x74]
test eax, eax
jbe 0x401831
add esp, 0xfffffff0
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x14]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], 0x4092c0
call fcn.00402080
add esp, 0x10
push edi
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0xfffffff0
mov eax, dword [ebp - 0x64]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x48]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], ecx
xor esi, esi
call fcn.00402350
add esp, 0x10
cmp eax, 0xffffffff
je 0x40187f
add esp, 0xfffffff8
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], 0x4092e0
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401f9e
add esp, 0xffffffe4
xor eax, eax
mov edx, dword [ebp - 0xc]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0x10000000
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp + 4], 0x40000000
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x30], eax
test eax, eax
je 0x401ff1
cmp eax, 0xffffffff
je 0x401ff1
add esp, 0xffffffe4
xor eax, eax
mov edx, dword [ebp - 0x48]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0x10000000
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x401fd6
cmp esi, 0xffffffff
je 0x401fd6
add esp, 0xfffffff0
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 0xfffffff0
xor eax, eax
mov edx, dword [ebp - 0x6c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 0xfffffff0
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x48]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], 0x409380
call sub.MSVCRT.dll_printf
mov eax, dword [ebp - 0x78]
add esp, 8
inc eax
mov dword [esp], eax
call sub.MSVCRT.dll_malloc
mov dword [ebp - 0x44], eax
add esp, 8
mov edx, dword [ebp - 0x4c]
test edx, edx
jbe 0x401d13
mov eax, edx
xor edx, edx
dec eax
mov ecx, dword [ebp - 0x78]
mov dword [ebp - 0x40], eax
xor edi, edi
div ecx
mov ecx, dword [ebp - 0x3c]
mov ebx, eax
lea eax, [ebx*4 + 8]
inc ebx
and ecx, 0xf0
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x28], ecx
je 0x4019fd
add esp, 0xfffffff8
mov dword [esp], eax
call sub.MSVCRT.dll_malloc
add esp, 0xfffffff4
lea edx, [ebp - 0x74]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x5c]
mov dword [esp + 8], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x38], eax
mov dword [eax], edx
mov edx, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x74]
cmp eax, dword [ebp - 0x5c]
jne 0x401cf5
test ebx, ebx
je 0x401bda
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x2c], esi
inc eax
mov dword [ebp - 0x20], eax
nop
dec ebx
je 0x401a20
mov ecx, dword [ebp - 0x78]
mov dword [ebp - 0x5c], ecx
jmp 0x401a30
mov eax, dword [ebp - 0x40]
xor edx, edx
mov esi, dword [ebp - 0x78]
div esi
lea ecx, [edx + 1]
mov dword [ebp - 0x5c], ecx
add esp, 0xffffffec
lea eax, [ebp - 0x74]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x74]
jne 0x401fb8
mov edx, dword [ebp - 0x28]
test edx, edx
je 0x401b03
mov edx, dword [ebp - 0x34]
test edx, edx
je 0x401ae0
mov edx, 0x1000
cmp eax, 0x600
mov dword [ebp - 0x58], 0x1000
jae 0x401aa7
mov eax, dword [ebp - 0x5c]
cmp eax, 0x600
sbb eax, eax
and eax, 0xfffffc00
add eax, 0x800
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x58]
add esp, 0xfffffff0
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x20]
mov dword [esp], ecx
call fcn.00401120
mov edx, eax
mov eax, dword [ebp - 0x5c]
inc edx
add esp, 0x10
cmp edx, eax
jae 0x401af7
mov esi, dword [ebp - 0x44]
mov eax, edx
mov dword [ebp - 0x5c], edx
mov byte [esi], 8
jmp 0x401af7
add esp, 0xfffffff8
mov edx, esi
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.004010f0
mov dword [ebp - 0x5c], eax
add esp, 8
mov edx, dword [ebp - 0x1c]
add eax, edx
mov edx, dword [ebp - 0x38]
mov dword [edx + edi*4 + 4], eax
add esp, 0xfffffff8
mov dword [esp], 0x4093e0
call sub.MSVCRT.dll_printf
mov eax, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x1c]
add esp, 8
add edx, eax
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x24]
test edx, edx
jne 0x401b60
mov edx, dword [ebp - 0x3c]
test dl, 1
je 0x401b9c
add esp, 0xfffffff8
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call fcn.00402730
add esp, 0xfffffff8
mov edx, dword [ebp - 0x5c]
mov dword [esp + 0xc], edi
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00402160
add esp, 0x10
mov eax, dword [ebp - 0x5c]
jmp 0x401b9c
add esp, 0xfffffff8
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call fcn.00402730
add esp, 0xfffffff0
mov edx, dword [ebp - 0x6c]
mov dword [esp + 0x14], edx
mov edx, dword [ebp - 0x4c]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edi
mov edx, dword [ebp - 0x5c]
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00402240
add esp, 0x18
mov eax, dword [ebp - 0x5c]
add esp, 0xffffffec
lea edx, [ebp - 0x74]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov edx, dword [ebp - 0x30]
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x74]
cmp eax, dword [ebp - 0x5c]
jne 0x40200c
inc edi
test ebx, ebx
jne 0x401a10
mov esi, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x401ce1
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x24]
mov eax, dword [eax]
test edx, edx
mov dword [ebp - 0x5c], eax
jne 0x401c2f
mov eax, dword [ebp - 0x3c]
test al, 1
je 0x401c6f
add esp, 0xfffffff8
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call fcn.00402730
add esp, 0xfffffff8
mov edx, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x38]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.00402160
add esp, 0x10
jmp 0x401c6f
add esp, 0xfffffff8
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call fcn.00402730
add esp, 0xfffffff0
mov edx, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x4c]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
mov edx, dword [ebp - 0x5c]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x38]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00402240
add esp, 0x18
add esp, 0xfffffff0
xor eax, eax
mov edx, dword [ebp - 0x6c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 0xffffffec
lea eax, [ebp - 0x74]
mov edx, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x38]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x74]
cmp eax, dword [ebp - 0x5c]
je 0x401ce1
add esp, 0xfffffff8
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], 0x4093a0
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401f9e
add esp, 0xfffffff8
mov dword [esp], 0x409400
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401d13
add esp, 0xfffffff8
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], 0x4093a0
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401fa9
mov eax, dword [ebp - 0x24]
mov ebx, 0x80000000
test eax, eax
je 0x401d26
mov ebx, 0x80030000
jmp 0x401d32
mov eax, dword [ebp - 0x3c]
test al, 1
je 0x401d32
mov ebx, 0x80010000
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x401d41
or ebx, 0x200
jmp 0x401d4e
mov eax, dword [ebp - 0x3c]
test al, 0x10
je 0x401d4e
or ebx, 0x100
add esp, 0xffffffe8
lea eax, [ebp - 0x50]
lea edx, [ebp - 0x54]
mov ecx, dword [ebp - 0x64]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.004024e0
add esp, 0xfffffff0
mov edx, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x4c]
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ecx
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x60]
mov dword [esp + 0x18], edx
shr ecx, 4
mov edx, dword [ebp - 0x50]
mov edi, dword [ebp - 0x54]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
mov dword [esp + 4], edx
mov dword [esp], ecx
call fcn.00402690
add esp, 0x18
mov edx, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x60]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], 0x409260
add ebx, 0x10
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x60], ebx
call fcn.00402160
mov dword [esp + 0xc], 0
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x14]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], 0x4092c0
call fcn.00402160
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x70]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x7c]
mov dword [esp], eax
call fcn.004026f0
add esp, 8
mov dword [ebp - 0x70], eax
mov dword [esp + 4], eax
mov dword [esp], 0x409420
call sub.MSVCRT.dll_printf
add esp, 0xfffffff8
xor eax, eax
mov edx, dword [ebp - 0x30]
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp + 4], eax
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 0xffffffec
lea eax, [ebp - 0x74]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x20
mov eax, dword [ebp - 0x7c]
mov edx, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x74]
cmp eax, 0x20
je 0x401ebb
add esp, 0xfffffff8
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], 0x409440
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401f9e
add esp, 0xfffffff0
xor eax, eax
mov edx, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
add edx, ecx
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 0xffffffec
lea eax, [ebp - 0x74]
mov edx, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x74]
cmp eax, dword [ebp - 0x64]
je 0x401f2f
add esp, 0xfffffff8
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], 0x409480
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401f9e
add esp, 0xffffffec
lea eax, [ebp - 0x74]
mov edx, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x14]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x74]
cmp eax, dword [ebp - 0x60]
jne 0x401f6a
xor al, al
mov byte [ebp - 0x18], al
jmp 0x401f9e
add esp, 0xfffffff8
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], 0x4094c0
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401f9e
add esp, 0xfffffff8
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], 0x4091e0
call sub.MSVCRT.dll_printf
add esp, 8
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x401476
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401476
add esp, 0xfffffff8
mov eax, dword [ebp - 0x48]
mov esi, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov dword [esp], 0x4093c0
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401f9e
add esp, 0xfffffff8
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], 0x409360
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401fa9
add esp, 0xfffffff8
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], 0x409320
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401f9e
add esp, 0xfffffff8
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov dword [esp], 0x4093a0
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401f9e
mov eax, dword [ebp - 0x74]
jmp 0x401627
add esp, 0xfffffff8
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], 0x409140
call sub.MSVCRT.dll_printf
add esp, 8
jmp 0x401476
add esp, 0xfffffff0
mov esi, dword [esi + 0xc]
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.MSVCRT.dll_strtoul
mov dword [ebp - 0x3c], eax
add esp, 0x10
jmp 0x4012ef