Function at 0x402ad0
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x3e8
push ebx
push ebp
push esi
mov esi, dword [esp + 0x3fc]
push edi
mov ecx, 0xc8
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x404]
push eax
lea eax, [esp + 0x1c]
mov ebx, 1
push eax
push 0x104
push ecx
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x402e6b
cmp eax, 0x104
ja 0x402e6b
mov edi, dword [esp + 0x3fc]
push 0x100
push esi
push ebx
lea edx, [esp + 0x24]
push str.Printer
push edx
push edi
call fcn.00403010
add esp, 0x18
test eax, eax
je 0x402e43
lea ebx, [esi + 0x208]
push 4
push ebx
push 0
lea eax, [esp + 0x24]
push str.ImageDriver
push eax
push edi
call fcn.00403010
add esp, 0x18
test eax, eax
jne 0x402b72
mov dword [ebx], eax
lea ecx, [esi + 0x100]
push 0x100
push ecx
push 1
lea edx, [esp + 0x24]
push str.OutputFile
push edx
push edi
call fcn.00403010
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x403001
lea ebp, [esi + 0x200]
push 4
push ebp
push 0
lea eax, [esp + 0x24]
push str.Type
push eax
push edi
call fcn.00403010
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x403001
lea ecx, [esi + 0x204]
push 4
push ecx
push 0
lea edx, [esp + 0x24]
push str.Resolution
push edx
push edi
call fcn.00403010
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x403001
lea eax, [esi + 0x2c4]
push 4
push eax
push 0
lea ecx, [esp + 0x24]
push str.Angle
push ecx
push edi
call fcn.00403010
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x403001
mov ebp, dword [ebp]
cmp ebp, 1
jne 0x402dbd
lea edx, [esi + 0x218]
push 0x80
push edx
push ebp
lea eax, [esp + 0x24]
push str.text.String
push eax
push edi
call fcn.00403010
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x402cd6
lea ecx, [esi + 0x298]
push 0x20
push ecx
push ebp
lea edx, [esp + 0x24]
push str.text.Face
push edx
push edi
call fcn.00403010
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x402cd6
lea eax, [esi + 0x2b8]
push 4
push eax
push 0
lea ecx, [esp + 0x24]
push str.text.CharSet
push ecx
push edi
call fcn.00403010
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x402cd6
lea edx, [esi + 0x2c0]
push 4
push edx
push 0
lea eax, [esp + 0x24]
push str.text.PtSize
push eax
push edi
call fcn.00403010
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x402cd6
lea ecx, [esi + 0x2c8]
push 4
push ecx
push 0
lea edx, [esp + 0x24]
push str.text.Color
push edx
push edi
call fcn.00403010
add esp, 0x18
mov ebx, eax
lea ebp, [esi + 0x2cc]
push 4
push ebp
push 0
lea eax, [esp + 0x24]
push str.text.Bold
push eax
push edi
call fcn.00403010
add esp, 0x18
test eax, eax
jne 0x402cfb
mov dword [ebp], eax
lea ebp, [esi + 0x2d0]
push 4
push ebp
push 0
lea ecx, [esp + 0x24]
push str.text.Italic
push ecx
push edi
call fcn.00403010
add esp, 0x18
test eax, eax
jne 0x402d20
mov dword [ebp], eax
lea ebp, [esi + 0x2bc]
push 4
push ebp
push 0
lea edx, [esp + 0x24]
push str.text.Outline
push edx
push edi
call fcn.00403010
add esp, 0x18
test eax, eax
jne 0x402d45
mov dword [ebp], eax
lea ebp, [esi + 0x2d4]
push 4
push ebp
push 0
lea eax, [esp + 0x24]
push str.text.AutoFontChange
push eax
push edi
call fcn.00403010
add esp, 0x18
test eax, eax
jne 0x402d6a
mov dword [ebp], eax
lea ebp, [esi + 0x2d8]
push 4
push ebp
push 0
lea ecx, [esp + 0x24]
push str.text.RightToLeft
push ecx
push edi
call fcn.00403010
add esp, 0x18
test eax, eax
jne 0x402d8f
mov dword [ebp], eax
lea ebp, [esi + 0x2e0]
push 4
push ebp
push 0
lea edx, [esp + 0x24]
push str.text.UseLines
push edx
push edi
call fcn.00403010
add esp, 0x18
test eax, eax
jne 0x402fee
mov dword [ebp], eax
jmp 0x402fee
cmp ebp, 2
jne 0x402e6b
lea eax, [esi + 0x218]
push 0x100
push eax
push 1
lea ecx, [esp + 0x24]
push str.image.File
push ecx
push edi
call fcn.00403010
lea ebp, [esi + 0x318]
push 4
push ebp
push 0
lea edx, [esp + 0x3c]
push str.image.Scale.x
push edx
push edi
mov ebx, eax
call fcn.00403010
add esp, 0x30
test eax, eax
jne 0x402e0f
mov dword [ebp], 0x64
lea eax, [esi + 0x31c]
push 4
push eax
push 0
lea eax, [esp + 0x24]
push str.image.Scale.y
push eax
push edi
call fcn.00403010
add esp, 0x18
test eax, eax
jne 0x402fee
mov ecx, dword [ebp]
mov dword [esi + 0x31c], ecx
jmp 0x402fee
push 0
push 0x80
push 3
push 0
push 1
lea edx, [esp + 0x2c]
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
jne 0x402e7a
xor ebx, ebx
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x3e8
ret
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x320
jne 0x402eb7
lea eax, [esp + 0x10]
push 0
push eax
push 0x320
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402eb0
cmp dword [esp + 0x10], 0x320
je 0x402fe7
xor ebx, ebx
jmp 0x402fe7
cmp eax, 0x2dc
jne 0x402eb0
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x124]
push eax
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402ee3
cmp dword [esp + 0x10], 0x2dc
je 0x402ee5
xor ebx, ebx
mov ebp, dword [sym.imp.MSVCRT.dll_strncpy]
lea eax, [esp + 0x11c]
push 0x100
push eax
push esi
call ebp
lea ecx, [esp + 0x228]
push 0x100
lea edx, [esi + 0x100]
push ecx
push edx
call ebp
mov eax, dword [esp + 0x3f8]
mov ecx, dword [esp + 0x400]
mov edx, dword [esp + 0x3e8]
mov dword [esi + 0x204], eax
mov dword [esi + 0x208], ecx
lea eax, [esp + 0x334]
push 0x80
lea ecx, [esi + 0x218]
push eax
push ecx
mov dword [esi + 0x200], 1
mov dword [esi + 0x2c4], edx
call ebp
lea edx, [esp + 0x3c0]
push 0x20
lea eax, [esi + 0x298]
push edx
push eax
call ebp
mov ecx, dword [esp + 0x3ec]
mov edx, dword [esp + 0x3f8]
mov eax, dword [esp + 0x3fc]
mov ebp, dword [esp + 0x44]
mov dword [esi + 0x2b8], ecx
mov ecx, dword [esp + 0x404]
mov dword [esi + 0x2bc], edx
mov edx, dword [esp + 0x408]
mov dword [esi + 0x2c0], eax
mov eax, dword [esp + 0x40c]
mov dword [esi + 0x2c8], ecx
mov ecx, dword [esp + 0x41c]
mov dword [esi + 0x2cc], edx
mov edx, dword [esp + 0x420]
mov dword [esi + 0x2d0], eax
mov eax, dword [esp + 0x424]
add esp, 0x30
mov dword [esi + 0x2d4], ecx
mov dword [esi + 0x2dc], edx
mov dword [esi + 0x2d8], eax
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x403001
push str.input_file_read
push esi
push edi
call fcn.004030f0
add esp, 0xc
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x3e8
ret