Function at 0x41ee40
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x4cdbf8]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x20]
test eax, eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x18]
mov esi, 0x10000
mov dword [ebp - 0x20], ecx
cmovne esi, eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp + 0x14]
push 3
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp + 0x1c]
push 0x4a0f94
push ebx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x1c], 0
call fcn.004873a2
add esp, 0xc
test eax, eax
jne 0x41ef55
add esi, 0x10000
cmp edi, 3
je 0x41eeb0
cmp edi, 4
jne 0x41eed0
lea eax, [ebx + 3]
push eax
push 0
push 0xf001f
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov edi, eax
mov dword [ebp - 0x10], edi
test edi, edi
jne 0x41eef3
cmp dword [ebp - 0x18], 3
je 0x41ef39
lea eax, [ebx + 3]
push eax
push esi
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edi, eax
mov dword [ebp - 0x10], eax
test edi, edi
je 0x41ef39
mov eax, 0x2000
jmp 0x41eef8
mov eax, 0x1000
or eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
call fcn.00436990
cmp esi, dword [eax + 0x1de0]
jge 0x41ef0f
mov eax, esi
jmp 0x41ef1a
call fcn.00436990
mov eax, dword [eax + 0x1de0]
push eax
push 0
push 0
push 0xf001f
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x41ef4d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047fe8c
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
jmp 0x41ef72
push 0
push dword [ebp - 0x14]
push edi
push dword [ebp - 0x10]
push dword [ebp - 8]
push dword [ebp - 0x20]
push ebx
call fcn.0041f350
mov edi, eax
add esp, 0x1c
mov dword [ebp - 0x10], edi
cmp edi, 0xffffffff
je 0x41ef39
test esi, esi
jns 0x41ef86
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
mov eax, 0x10000
push 0x58
cmove esi, eax
call fcn.00487397
mov edi, eax
add esp, 4
test edi, edi
je 0x41efae
push 0x58
push 0
push edi
call fcn.00481c10
add esp, 0xc
mov eax, dword [ebp - 0x14]
mov ecx, ebx
mov dword [edi + 0x1c], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + 8], eax
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41efc0
sub ecx, edx
lea eax, [ecx + 1]
push eax
call fcn.00487397
add esp, 4
mov dword [edi], eax
mov cl, byte [ebx]
lea ebx, [ebx + 1]
mov byte [eax], cl
lea eax, [eax + 1]
test cl, cl
jne 0x41efd7
test dword [ebp - 0x14], 0x3000
mov dword [edi + 0x30], 1
je 0x41f033
call fcn.00436990
cmp esi, dword [eax + 0x1de0]
jge 0x41f006
mov eax, esi
jmp 0x41f011
call fcn.00436990
mov eax, dword [eax + 0x1de0]
mov dword [edi + 0x10], eax
mov eax, esi
cdq
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x1c]
mov dword [edi + 0x24], edx
mov dword [edi + 0x18], 4
mov dword [edi + 0x40], fcn.0041e340
jmp 0x41f0b3
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x41f047
lea ecx, [ebp - 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
jmp 0x41f052
xorps xmm0, xmm0
movlpd qword [ebp - 0xc], xmm0
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 0x20], 0
mov ecx, dword [ebp - 8]
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], ecx
jge 0x41f09b
test ecx, ecx
jl 0x41f07c
jg 0x41f06e
cmp eax, 0xbebc200
jbe 0x41f07c
mov edx, 0xbebc200
mov dword [ebp - 8], 0
jmp 0x41f081
mov edx, eax
mov dword [ebp - 8], ecx
cmp esi, edx
jg 0x41f09b
test ecx, ecx
jl 0x41f099
jg 0x41f092
cmp eax, 0xbebc200
jbe 0x41f099
mov esi, 0xbebc200
jmp 0x41f09b
mov esi, eax
xor ecx, ecx
mov dword [edi + 0x10], esi
add esi, 1
setb cl
neg ecx
or ecx, esi
push ecx
call fcn.00487397
add esp, 4
mov ecx, dword [ebp - 4]
mov dword [edi + 0x14], eax
xor ecx, ebp
mov eax, edi
pop edi
pop esi
pop ebx
call fcn.0047fe8c
mov esp, ebp
pop ebp
ret