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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b7fd9
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x504e20]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], 0
mov eax, dword [0x5049f8]
mov ecx, 0x5049f8
mov dword [ebp - 4], 0
call dword [eax + 0xc]
mov ebx, dword [ebp + 8]
add eax, 0x10
mov dword [ebx], eax
mov ecx, 1
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], ecx
call fcn.004168a0
test al, al
jne 0x416388
mov esi, dword [0x506280]
mov eax, 0xae4c415d
imul esi
add edx, esi
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul ecx, ecx, 0x5e
mov eax, esi
sub eax, ecx
xor edi, edi
cmp eax, 0xf
je 0x416382
lea ebx, [ebx]
mov eax, esi
or eax, 0xffffff30
add esi, eax
mov eax, esi
imul eax, esi
inc edi
cmp edi, eax
jg 0x416382
mov eax, 0xae4c415d
imul esi
add edx, esi
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul ecx, ecx, 0x5e
mov eax, esi
sub eax, ecx
cmp eax, 0xf
jne 0x416350
mov dword [0x506280], edi
mov edi, dword [ebp + 0xc]
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
je 0x416439
mov ecx, 0x4c0b9c
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4163c6
test dx, dx
je 0x4163c2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4163c6
add eax, 4
add ecx, 4
test dx, dx
jne 0x4163a0
xor eax, eax
jmp 0x4163cb
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
jne 0x416439
lea eax, [ebp - 0x20]
push eax
call fcn.00415d40
mov ecx, 3
mov dword [ebp - 0x14], ecx
mov ecx, dword [eax]
xor eax, eax
add esp, 4
test ecx, ecx
setne al
test eax, eax
jne 0x4163ff
push 0x80004005
call fcn.00402e10
mov eax, dword [edi]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x416427
test dx, dx
je 0x416423
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x416427
add eax, 4
add ecx, 4
test dx, dx
jne 0x416401
xor eax, eax
jmp 0x41642c
sbb eax, eax
or eax, 1
test eax, eax
sete al
mov byte [ebp - 0xe], 0
test al, al
je 0x41643d
mov byte [ebp - 0xe], 1
mov eax, dword [ebp - 0x14]
or esi, 0xffffffff
test al, 2
je 0x416469
mov edx, dword [ebp - 0x20]
and eax, 0xfffffffd
add edx, 0xfffffff0
mov dword [ebp - 0x14], eax
lea eax, [edx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x416469
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xe], 0
je 0x41650d
lea eax, [ebp - 0x18]
push eax
call fcn.00415d40
add esp, 4
mov dword [ebp - 4], 1
mov ecx, dword [eax]
mov edi, dword [ebx]
lea edx, [ecx - 0x10]
sub edi, 0x10
cmp edx, edi
je 0x4164d7
cmp dword [edi + 0xc], 0
jl 0x4164cc
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x4164cc
push edx
call fcn.00404d50
add esp, 4
mov dword [ebp - 0x20], eax
mov ecx, esi
lea edx, [edi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4164c5
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x20]
add eax, 0x10
mov dword [ebx], eax
jmp 0x4164d7
push dword [ecx - 0xc]
push ecx
mov ecx, ebx
call fcn.00407df0
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x416782
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 3
push 0
push 0
push SysReAllocStringLen
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
jne 0x416544
lea eax, [ebp - 0x18]
push eax
call fcn.00415d40
add esp, 4
mov dword [ebp - 4], 2
jmp 0x416486
lea ecx, [ebp - 0x2c]
push ecx
xorps xmm0, xmm0
push eax
movq qword [ebp - 0x2c], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x41659d
lea eax, [ebp - 0x18]
push eax
call fcn.00415d40
add esp, 4
mov dword [ebp - 4], 3
push eax
mov ecx, ebx
call fcn.00402500
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x416779
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x416779
cmp dword [ebp - 0x28], 0
je 0x4165b8
lea eax, [ebp - 0x18]
push eax
call fcn.00415d40
add esp, 4
mov dword [ebp - 4], 4
jmp 0x41656e
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x416779
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
push eax
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], 5
call fcn.0041b560
mov edi, dword [ebp - 0x38]
push 0
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x2c]
mov dword [ebp - 0x24], 0
push edi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41676c
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xf]
push eax
lea eax, [ebp - 0xd]
push eax
push edi
mov byte [ebp - 0xd], 0
mov byte [ebp - 0xf], 0
mov dword [ebp - 0x1c], 0
call fcn.00441070
mov eax, dword [ebp - 0x1c]
add esp, 0x10
test eax, eax
jle 0x41664b
add eax, edi
push eax
push edi
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x38]
call fcn.0041b240
mov edi, dword [ebp - 0x38]
cmp byte [ebp - 0xf], 0
mov ebx, dword [ebp - 0x34]
je 0x416684
mov esi, edi
call fcn.00416950
test al, al
jne 0x416665
inc dword [0x506280]
cmp edi, ebx
je 0x416681
lea esp, [esp]
mov cl, byte [esi]
mov dl, byte [esi + 1]
mov byte [esi + 1], cl
mov byte [esi], dl
add esi, 2
cmp esi, ebx
jne 0x416670
or esi, 0xffffffff
sub ebx, edi
cmp byte [edi + ebx - 1], 0
je 0x4166b9
inc ebx
push ebx
lea ecx, [ebp - 0x38]
call fcn.0041b560
mov edi, dword [ebp - 0x38]
mov byte [edi + ebx - 1], 0
cmp byte [ebp - 0xd], 0
je 0x416712
inc ebx
push ebx
lea ecx, [ebp - 0x38]
call fcn.0041b560
mov edi, dword [ebp - 0x38]
mov byte [edi + ebx - 1], 0
jmp 0x4166d4
cmp byte [ebp - 0xd], 0
je 0x416712
lea eax, [ebx + 2]
push eax
lea ecx, [ebp - 0x38]
call fcn.0041b560
mov edi, dword [ebp - 0x38]
mov word [edi + ebx], 0
cmp byte [ebp - 0xd], 0
je 0x416712
push edi
lea ecx, [ebp - 0x18]
call fcn.00401b70
mov ebx, dword [ebp + 8]
push eax
mov ecx, ebx
mov byte [ebp - 4], 6
call fcn.00402500
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
mov byte [ebp - 4], 5
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x41676c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x41676c
mov eax, dword [0x5049f8]
mov ecx, 0x5049f8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
push edi
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 7
call fcn.00402600
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
mov ecx, ebx
mov byte [ebp - 4], 8
call fcn.00402500
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
mov byte [ebp - 4], 5
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x416762
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
push ebx
call fcn.00440300
add esp, 8
test edi, edi
je 0x416779
push edi
call fcn.0049655e
add esp, 4
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret