Function at 0x474a00
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d20c2
mov eax, dword fs:[0]
push eax
sub esp, 0x420
mov eax, dword [0x4edca4]
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 ebx, ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x424], eax
mov eax, dword [ebp + 0xc]
push 0x104
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.004a3c72
xor eax, eax
add esp, 0xc
mov word [ebp - 0x12], ax
cmp word [ebp - 0x218], ax
je 0x474aed
push eax
push 0x80
push 3
push eax
push 1
push Ordinal_3
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x474aed
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, eax
mov dword [ebp - 0x420], esi
test esi, esi
je 0x474ae6
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esi + 1]
push 1
push eax
call fcn.0048ff3a
mov esi, eax
add esp, 8
test esi, esi
je 0x474ae6
push 0
lea eax, [ebp - 0x428]
push eax
push dword [ebp - 0x420]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x474b0d
push esi
call fcn.0048ff50
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
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.00485a4c
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x420]
push edi
mov byte [esi + eax], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
mov dword [ebp - 0x420], esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x474b30
sub ecx, edx
cmp ecx, 3
jb 0x474b58
cmp byte [esi], 0xef
jne 0x474b58
cmp byte [esi + 1], 0xbb
jne 0x474b58
cmp byte [esi + 2], 0xbf
jne 0x474b58
lea eax, [esi + 3]
mov dword [ebp - 0x420], eax
push 0x5c
call fcn.00485e5f
add esp, 4
mov dword [ebp - 0x42c], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x474b84
push dword [ebp - 0x424]
mov ecx, eax
call fcn.0047c820
mov edi, eax
jmp 0x474b86
xor edi, edi
mov dword [ebp - 4], 0xffffffff
test edi, edi
jne 0x474b9f
push esi
call fcn.0048ff50
add esp, 4
jmp 0x474aed
lea ecx, [ebp - 0x418]
mov byte [ebp - 0x419], 0
push ecx
push dword [ebp - 0x420]
xor eax, eax
lea ecx, [edi + 0xc]
mov word [ebp - 0x418], ax
call fcn.0047c5e0
test al, al
je 0x474c38
lea eax, [ebp - 0x420]
mov dword [ebp - 0x420], 0
push eax
push 0x4d3b04
lea ecx, [edi + 0xc]
call fcn.0047c170
mov eax, dword [ebx + 4]
test eax, eax
je 0x474bf7
cmp dword [ebp - 0x420], eax
jne 0x474c16
jmp 0x474c0f
mov eax, dword [ebp - 0x420]
mov dword [ebx + 4], eax
movzx eax, ax
push eax
call fcn.00474db0
add esp, 4
mov dword [ebx + 8], eax
mov byte [ebp - 0x419], 1
lea eax, [edi + 0x14]
push eax
push str.dlgfont
lea ecx, [edi + 0xc]
call fcn.0047c310
lea eax, [edi + 0x18]
push eax
push str.dlgfontsize
lea ecx, [edi + 0xc]
call fcn.0047c170
push esi
call fcn.0048ff50
add esp, 4
cmp byte [ebp - 0x419], 0
je 0x474cb4
push dword [ebp - 0x424]
mov ecx, ebx
call fcn.00474d60
mov esi, eax
cmp esi, 0xffffffff
je 0x474c74
mov edx, dword [edi]
mov ecx, edi
push 1
call dword [edx]
mov ecx, dword [ebx + 0x10]
mov eax, dword [ecx + esi*4]
inc dword [eax + 8]
jmp 0x474cfe
mov ecx, dword [ebx + 0xc]
xor esi, esi
test ecx, ecx
jle 0x474c8d
mov eax, dword [ebx + 0x10]
cmp dword [eax], 0
je 0x474c8d
inc esi
add eax, 4
cmp esi, ecx
jl 0x474c80
cmp esi, ecx
jne 0x474cf8
lea eax, [ecx + 1]
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0x424], eax
test ecx, ecx
jne 0x474cc1
push 4
push 0x10
call fcn.0048ff3a
add esp, 8
mov dword [ebx + 0x10], eax
test eax, eax
jne 0x474cef
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax]
jmp 0x474aed
and eax, 0x8000000f
jns 0x474ccf
dec eax
or eax, 0xfffffff0
add eax, 1
jne 0x474cef
mov eax, dword [ebp - 0x424]
lea eax, [eax*4 + 0x40]
push eax
push ecx
call fcn.0048ff45
add esp, 8
test eax, eax
je 0x474cb4
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 0x424]
mov dword [ebx + 0xc], eax
mov eax, dword [ebx + 0x10]
mov dword [eax + esi*4], edi
cmp dword [ebp + 0x10], 0
jne 0x474d0d
push esi
call fcn.0047b410
add esp, 4
mov eax, 1
jmp 0x474aef