Function at 0x46eec7
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov dword [ebp - 0x50], ecx
mov eax, dword [ebp + 0xc]
mov dword [eax], 0
push 0
push 1
push 3
push 0
push 1
push closesocket
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x46ef02
xor eax, eax
jmp 0x46f11e
push 0
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x16
ja 0x46ef28
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x46f11e
push 0
push 0
push 0
push 2
push 0
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0
cmp dword [ebp - 0x10], 0
je 0x46f0dd
push 0
push 0
push 0
push 4
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x46ef70
jmp 0x46f0dd
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 4]
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x18]
add ecx, 0x16
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x48]
xor eax, eax
mov ax, word [edx + 0x14]
imul eax, eax, 0x11
mov ecx, dword [ebp - 0x18]
add ecx, eax
cmp ecx, dword [ebp - 8]
jle 0x46efa1
jmp 0x46f0dd
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x18]
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x3c], 0
jmp 0x46efbc
mov eax, dword [ebp - 0x3c]
add eax, 1
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x48]
xor edx, edx
mov dx, word [ecx + 0x14]
cmp dword [ebp - 0x3c], edx
jge 0x46efe1
mov eax, dword [ebp - 0x3c]
imul eax, eax, 0x11
mov ecx, dword [ebp - 0x4c]
xor edx, edx
mov dl, byte [ecx + eax]
cmp edx, 2
jne 0x46efdf
jmp 0x46efe1
jmp 0x46efb3
mov eax, dword [ebp - 0x48]
xor ecx, ecx
mov cx, word [eax + 0x14]
cmp dword [ebp - 0x3c], ecx
jl 0x46eff4
jmp 0x46f0dd
mov edx, dword [ebp - 0x3c]
imul edx, edx, 0x11
mov eax, dword [ebp - 0x4c]
mov ecx, dword [eax + edx + 9]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x3c]
imul edx, edx, 0x11
mov eax, dword [ebp - 0x4c]
mov ecx, dword [eax + edx + 0xd]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x44]
add edx, dword [ebp - 0x24]
cmp dword [ebp - 8], edx
jl 0x46f025
cmp dword [ebp - 0x24], 0xe
jae 0x46f02a
jmp 0x46f0dd
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax + 0xe]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x20]
cmp dword [ecx + 0x20], 0
je 0x46f051
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x20]
mov dword [ebp - 0x54], eax
jmp 0x46f066
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov dx, word [ecx + 0xe]
mov ecx, edx
mov eax, 1
shl eax, cl
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x54]
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x1c]
xor eax, eax
mov ax, word [edx + 0xe]
cmp eax, 8
jle 0x46f09f
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + 0x20]
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + edx*4 + 0x28]
mov edx, dword [ebp - 0x1c]
xor eax, eax
cmp dword [edx + 0x10], 3
setne al
dec eax
and eax, 3
lea ecx, [ecx + eax*4]
mov dword [ebp - 0x14], ecx
jmp 0x46f0ac
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x1c]
lea ecx, [eax + edx*4 + 0x28]
mov dword [ebp - 0x14], ecx
push 0
lea ecx, [ebp - 0x38]
call fcn.004abae5
push 0
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x14]
push eax
push 4
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
lea ecx, [ebp - 0x38]
call fcn.004abb57
cmp dword [ebp - 4], 0
je 0x46f0ed
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x10], 0
je 0x46f0fd
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xc], 0
je 0x46f10d
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp + 0xc]
cmp dword [edx], 0
jne 0x46f119
xor eax, eax
jmp 0x46f11e
mov eax, 1
mov esp, ebp
pop ebp
ret 8