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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a2d32
mov eax, dword fs:[0]
push eax
sub esp, 0x13c
mov eax, dword [0x4d9754]
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 eax, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x140], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0x40], 0x4acf9c
mov dword [ebp - 0x18], 0x4acfa4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
test esi, esi
mov dword [ebp - 4], 0
mov edx, 0x4b65d4
cmovne edx, esi
xor eax, eax
mov ecx, edx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
lea esi, [ecx + 2]
mov dword [ebp - 0x28], eax
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46eb80
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x3c]
call fcn.0040f72e
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov eax, dword [eax + 4]
push dword [ebp + eax - 0x18]
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0x130]
mov dword [ebp - 4], 1
push eax
lea ecx, [ebp - 0x40]
call fcn.00460144
lea ecx, [ebp - 0x130]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x144], eax
call fcn.00404cc0
cmp dword [ebp - 0x28], 8
lea ebx, [ebp - 0x3c]
mov eax, dword [ebp - 0x2c]
cmovae ebx, dword [ebp - 0x3c]
test eax, eax
je 0x46ec60
dec eax
or ecx, 0xffffffff
cmp eax, ecx
cmovb ecx, eax
movzx eax, word [ebx + ecx*2]
push eax
lea edi, [ebx + ecx*2]
call fcn.00476af2
push 0x2e
mov si, ax
call fcn.00476af2
add esp, 8
cmp si, ax
je 0x46ec45
cmp edi, ebx
je 0x46ec5d
movzx eax, word [edi - 2]
sub edi, 2
push eax
call fcn.00476af2
push 0x2e
mov si, ax
call fcn.00476af2
add esp, 8
cmp si, ax
jne 0x46ec22
sub edi, ebx
sar edi, 1
cmp edi, 0xffffffff
je 0x46ec5d
cmp edi, dword [ebp - 0x144]
jb 0x46ec5d
push 1
push 0xffffffffffffffff
push edi
jmp 0x46ec65
mov eax, dword [ebp - 0x2c]
push 1
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0xb8]
call fcn.004600a9
cmp dword [ebp - 0xa0], 8
lea eax, [ebp - 0xb4]
mov ecx, dword [ebp - 0xa4]
mov ebx, 5
cmovae eax, dword [ebp - 0xb4]
mov byte [ebp - 4], 2
mov dword [ebp - 0x144], ebx
cmp ecx, 4
jne 0x46ecb9
push ecx
push 0x4b0904
push eax
call fcn.00476b67
add esp, 0xc
test eax, eax
je 0x46ed99
lea eax, [ebp - 0xf4]
push eax
lea ecx, [ebp - 0x40]
call fcn.00460144
lea ecx, [ebp - 0xf4]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x148], eax
call fcn.00404cc0
cmp dword [ebp - 0x28], 8
lea ebx, [ebp - 0x3c]
mov eax, dword [ebp - 0x2c]
cmovae ebx, dword [ebp - 0x3c]
test eax, eax
je 0x46ed5e
dec eax
mov ecx, 0xffffffff
cmp eax, 0xffffffff
cmovb ecx, eax
movzx eax, word [ebx + ecx*2]
push eax
lea edi, [ebx + ecx*2]
call fcn.00476af2
push 0x2e
mov si, ax
call fcn.00476af2
add esp, 8
cmp si, ax
je 0x46ed43
lea esp, [esp]
cmp edi, ebx
je 0x46ed5b
movzx eax, word [edi - 2]
sub edi, 2
push eax
call fcn.00476af2
push 0x2e
mov si, ax
call fcn.00476af2
add esp, 8
cmp si, ax
jne 0x46ed20
sub edi, ebx
sar edi, 1
cmp edi, 0xffffffff
je 0x46ed5b
cmp edi, dword [ebp - 0x148]
jb 0x46ed5b
push 1
push 0xffffffffffffffff
push edi
jmp 0x46ed63
mov eax, dword [ebp - 0x2c]
push 1
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x7c]
call fcn.004600a9
cmp dword [ebp - 0x64], 8
lea eax, [ebp - 0x78]
mov ecx, dword [ebp - 0x68]
mov ebx, 0xf
cmovae eax, dword [ebp - 0x78]
test ecx, ecx
jne 0x46eda2
push ecx
push 0x4b65d4
push eax
call fcn.00476b67
add esp, 0xc
test eax, eax
jne 0x46eda2
mov byte [ebp - 0x131], 1
jmp 0x46eda9
mov byte [ebp - 0x131], 0
test bl, 2
je 0x46edb9
lea ecx, [ebp - 0x7c]
and ebx, 0xfffffffd
call fcn.00404cc0
mov dword [ebp - 4], 1
test bl, 1
je 0x46edd0
lea ecx, [ebp - 0xb8]
call fcn.00404cc0
cmp byte [ebp - 0x131], 0
je 0x46edfb
push dword [ebp + 0x14]
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x13c]
push dword [ebp - 0x140]
call fcn.0046f320
add esp, 0x10
mov edi, eax
jmp 0x46ef52
cmp dword [ebp - 0x28], 8
lea eax, [ebp - 0x3c]
push 0
cmovae eax, dword [ebp - 0x3c]
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x148], esi
mov byte [ebp - 4], 3
cmp esi, 0xffffffff
je 0x46ef3c
lea eax, [ebp - 0x138]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x46ef3c
cmp dword [ebp - 0x138], 0
jne 0x46ef3c
push ebx
call fcn.00459c53
mov edi, eax
add esp, 4
test edi, edi
je 0x46ef3c
push 0
lea eax, [ebp - 0x138]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46ef33
cmp dword [ebp - 0x138], 0
je 0x46ef33
lea eax, [ebp - 0xf4]
push eax
lea ecx, [ebp - 0x40]
call fcn.00469c60
add eax, 4
push str..bmp
push eax
call fcn.0046d3e0
add esp, 8
lea ecx, [ebp - 0xf4]
mov bl, al
call fcn.00404cc0
test bl, bl
je 0x46eed9
push edi
push dword [ebp - 0x13c]
push dword [ebp - 0x140]
call fcn.0046f2e0
jmp 0x46ef1c
lea eax, [ebp - 0xf4]
push eax
lea ecx, [ebp - 0x40]
call fcn.00469c60
add eax, 4
push str..wmf
push eax
call fcn.0046d3e0
add esp, 8
lea ecx, [ebp - 0xf4]
mov bl, al
call fcn.00404cc0
test bl, bl
je 0x46ef33
push edi
push dword [ebp - 0x13c]
push dword [ebp - 0x140]
call fcn.0046f370
add esp, 0xc
test eax, eax
je 0x46ef33
push edi
call fcn.004598bc
add esp, 4
mov edi, 1
jmp 0x46ef3e
push edi
call fcn.004598bc
add esp, 4
xor edi, edi
test esi, esi
je 0x46ef52
cmp dword [sym.imp.KERNEL32.dll_CloseHandle], 0
je 0x46ef52
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x40]
call fcn.00404cc0
mov eax, edi
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.0045978b
mov esp, ebp
pop ebp
ret