Function at 0x1004a55c
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1006a90d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x70
push ebx
push esi
push edi
mov dword [esp + 0x18], ecx
mov edi, edx
xor ebx, ebx
mov dword [esp + 0x10], 0xa77c8748
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], ebx
jmp 0x1004a5a7
mov eax, dword [esp + 0x10]
mov dword [esp + eax*4 + 0x40], 0xffffffff
inc dword [esp + 0x10]
cmp dword [esp + 0x10], 2
jl 0x1004a597
mov dword [esp + 0x10], ebx
xor edx, edx
mov eax, dword [esp + 0x10]
mov eax, dword [esp + 0x40]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
cmp ecx, eax
setl dl
xor esi, esi
inc esi
cmp edx, dword [esp + 0x40]
jge 0x1004a5f7
mov dword [esp + 0x20], esi
mov eax, dword [esp + 0x20]
mov dword [esp + 0x20], eax
mov byte [esp + 0xf], bl
cmp byte [esp + 0xf], bl
je 0x1004a629
push ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
jmp 0x1004a629
mov dword [esp + 0x10], ebx
jmp 0x1004a623
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x14], esi
cmp dword [esp + 0x14], ebx
jl 0x1004a61f
mov eax, dword [esp + 0x14]
cmp dword [esp + eax*4 + 0x40], ebx
jne 0x1004a61f
dec dword [esp + 0x14]
jns 0x1004a60f
inc dword [esp + 0x10]
cmp dword [esp + 0x10], esi
jle 0x1004a5fd
mov dword [esp + 0x14], 0xf95
mov dword [esp + 0x10], 0xf7f3e76e
mov dword [esp + 0x20], 0xff63588c
mov dword [esp + 0x24], 0xd7c3b7c3
mov dword [esp + 0x28], 7
mov byte [esp + 0xf], bl
cmp byte [esp + 0xf], bl
je 0x1004a663
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov eax, dword [esp + 0x10]
mov ecx, ebx
imul eax, dword [esp + 0x10], 0x8ec
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x10], ebx
je 0x1004a68d
mov ecx, esi
mov eax, dword [esp + 0x14]
neg ecx
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov eax, dword [esp + 0x10]
cmp eax, esi
setle cl
mov dword [esp + 0x24], ecx
mov eax, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
dec dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x28], eax
mov eax, dword [0x10617018]
test al, 1
jne 0x1004a753
or eax, esi
mov dword [0x10617018], eax
push ebx
mov dword [esp + 0x88], ebx
push ebx
mov dword [0x10617020], ebx
mov dword [0x10617024], ebx
call fcn.1001916e
mov dword [0x10617020], eax
mov dword [0x10617028], ebx
mov dword [0x10617030], ebx
mov byte [esp + 0x84], 2
mov ecx, 0x10617028
mov dword [esp + 0x30], eax
lea eax, [esp + 0x30]
push eax
push 0x10
push ebx
lea eax, [esp + 0x44]
mov dword [0x1061703c], 0x3f800000
push eax
mov dword [0x1061702c], ebx
call fcn.10018ee7
push 0x1006ab3f
mov dword [0x10617034], 7
mov dword [0x10617038], 8
call fcn.10050d49
or dword [esp + 0x88], 0xffffffff
pop ecx
imul eax, dword [esp + 0x18], 0x2710
lea ecx, [esp + 0x4c]
push 3
pop esi
push esi
add eax, edi
mov dword [esp + 0x30], eax
call fcn.10016555
mov dword [esp + 0x14], 0x69ad59e5
mov dword [esp + 0x14], ebx
jmp 0x1004a78f
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x4c]
mov dword [eax + ecx*4], 0xfffffff6
inc dword [esp + 0x14]
cmp dword [esp + 0x14], esi
jl 0x1004a77c
mov byte [esp + 0xf], bl
cmp byte [esp + 0xf], 0
je 0x1004a7b0
push 0x1816
push 0xf06
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
mov dword [esp + 0x14], 2
cmp dword [esp + 0x14], ebx
jl 0x1004a7f4
mov byte [esp + 0xf], bl
cmp byte [esp + 0xf], 0
je 0x1004a7df
push ebx
push 0x1156
push 0xec6
push 0xd44
call dword [sym.imp.GDI32.dll_GetSystemPaletteEntries]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x4c]
mov dword [eax + ecx*4], 0xfffffffd
dec dword [esp + 0x14]
jns 0x1004a7be
lea ecx, [esp + 0x4c]
call fcn.100165d7
lea eax, [esp + 0x2c]
push eax
call fcn.1004a974
mov eax, dword [eax]
test eax, eax
je 0x1004a816
mov dword [esp + 0x40], eax
jmp 0x1004a956
mov eax, dword [0x10617018]
test al, 2
jne 0x1004a8b0
or eax, 2
mov dword [0x10617018], eax
push ebx
mov dword [esp + 0x88], esi
push ebx
mov dword [0x10617040], ebx
mov dword [0x10617044], ebx
call fcn.1001916e
mov dword [0x10617040], eax
mov dword [0x10617048], ebx
mov dword [0x10617050], ebx
mov byte [esp + 0x84], 5
mov ecx, 0x10617048
mov dword [esp + 0x34], eax
lea eax, [esp + 0x34]
push eax
push 0x10
push ebx
lea eax, [esp + 0x48]
mov dword [0x1061705c], 0x3f800000
push eax
mov dword [0x1061704c], ebx
call fcn.10018ee7
push 0x1006ab3a
mov dword [0x10617054], 7
mov dword [0x10617058], 8
call fcn.10050d49
or dword [esp + 0x88], 0xffffffff
pop ecx
lea eax, [esp + 0x18]
xorps xmm0, xmm0
push eax
movdqu xmmword [esp + 0x5c], xmm0
call fcn.1004a9d6
mov ebx, dword [eax]
mov al, byte [ebp + 0xc]
test al, al
jne 0x1004a8d0
test ebx, ebx
jne 0x1004a92e
lea ecx, [esp + 0x68]
mov dl, al
push ecx
mov ecx, dword [esp + 0x1c]
call fcn.10048e56
cmp byte [ebp + 0xc], 0
lea edi, [esp + 0x5c]
mov esi, eax
pop ecx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
je 0x1004a905
mov ecx, dword [esp + 0x60]
test ecx, ecx
je 0x1004a905
mov eax, dword [esp + 0x64]
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], ecx
test ebx, ebx
jne 0x1004a92a
cmp dword [esp + 0x58], ebx
jle 0x1004a92a
mov ecx, dword [esp + 0x5c]
test ecx, ecx
je 0x1004a92a
call fcn.1004a121
mov ebx, eax
lea eax, [esp + 0x18]
push eax
call fcn.1004a9d6
mov dword [eax], ebx
mov edi, dword [esp + 0x1c]
lea ecx, [esp + 0x58]
call fcn.10049e45
test ebx, ebx
je 0x1004a956
mov edx, edi
mov ecx, ebx
call fcn.1004a24f
mov esi, eax
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x44], esi
call fcn.1004a974
mov dword [eax], esi
mov eax, dword [ebp + 8]
lea esi, [esp + 0x40]
mov ecx, dword [esp + 0x7c]
mov edi, eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret