Function at 0x41d7d0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x4ccbf8]
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 0x4a1004
push ebx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x1c], 0
call fcn.00486932
add esp, 0xc
test eax, eax
jne 0x41d8e5
add esi, 0x10000
cmp edi, 3
je 0x41d840
cmp edi, 4
jne 0x41d860
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 0x41d883
cmp dword [ebp - 0x18], 3
je 0x41d8c9
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 0x41d8c9
mov eax, 0x2000
jmp 0x41d888
mov eax, 0x1000
or eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
call fcn.00435f20
cmp esi, dword [eax + 0x1de0]
jge 0x41d89f
mov eax, esi
jmp 0x41d8aa
call fcn.00435f20
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 0x41d8dd
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.0047f41c
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
jmp 0x41d902
push 0
push dword [ebp - 0x14]
push edi
push dword [ebp - 0x10]
push dword [ebp - 8]
push dword [ebp - 0x20]
push ebx
call fcn.0041dce0
mov edi, eax
add esp, 0x1c
mov dword [ebp - 0x10], edi
cmp edi, 0xffffffff
je 0x41d8c9
test esi, esi
jns 0x41d916
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.00486927
mov edi, eax
add esp, 4
test edi, edi
je 0x41d93e
push 0x58
push 0
push edi
call fcn.004811a0
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 0x41d950
sub ecx, edx
lea eax, [ecx + 1]
push eax
call fcn.00486927
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 0x41d967
test dword [ebp - 0x14], 0x3000
mov dword [edi + 0x30], 1
je 0x41d9c3
call fcn.00435f20
cmp esi, dword [eax + 0x1de0]
jge 0x41d996
mov eax, esi
jmp 0x41d9a1
call fcn.00435f20
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.0041ccd0
jmp 0x41da43
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x41d9d7
lea ecx, [ebp - 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
jmp 0x41d9e2
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 0x41da2b
test ecx, ecx
jl 0x41da0c
jg 0x41d9fe
cmp eax, 0xbebc200
jbe 0x41da0c
mov edx, 0xbebc200
mov dword [ebp - 8], 0
jmp 0x41da11
mov edx, eax
mov dword [ebp - 8], ecx
cmp esi, edx
jg 0x41da2b
test ecx, ecx
jl 0x41da29
jg 0x41da22
cmp eax, 0xbebc200
jbe 0x41da29
mov esi, 0xbebc200
jmp 0x41da2b
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.00486927
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.0047f41c
mov esp, ebp
pop ebp
ret