Function at 0x41501c
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x18]
call fcn.0040340c
xor eax, eax
push ebp
push 0x4153ff
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x14]
xor edx, edx
mov dword [eax], edx
mov eax, dword [ebp - 0x14]
add eax, 8
mov edx, dword [ebp - 0x18]
call fcn.00403100
mov eax, dword [ebp - 0x14]
mov byte [eax + 0x2b], 0
mov eax, dword [ebp - 0x14]
mov byte [eax + 0xc], 0
mov eax, dword [ebp - 0x14]
mov byte [eax + 0xd], 0
mov eax, dword [ebp - 0x14]
mov byte [eax + 0xe], 1
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
call fcn.0040341c
push eax
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jbe 0x4150b4
cmp dword [ebp - 8], 0xffffffff
je 0x4150b4
push 0
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_GetFileSize
mov dword [ebp - 0x20], eax
jmp 0x4150b9
xor eax, eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jbe 0x4153a5
push 0
push 0
push 0
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_SetFilePointer
cmp dword [ebp - 0x20], 0xb
jbe 0x415216
push ebp
mov eax, dword [ebp - 0x14]
add eax, 0xf
mov edx, 0xc
call fcn.00414f84
pop ecx
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 0xf]
mov edx, 0x415414
cmp al, byte [edx]
jne 0x41511d
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 0x11]
mov edx, 0x415414
cmp al, byte [edx + 2]
jne 0x41511d
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 0x12]
mov edx, 0x415414
cmp al, byte [edx + 3]
je 0x415121
xor eax, eax
jmp 0x415123
mov al, 1
mov byte [ebp - 0x29], al
cmp byte [ebp - 0x29], 0
je 0x41521a
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 0x10]
mov edx, 0x415414
cmp al, byte [edx + 1]
je 0x4151b4
mov eax, dword [ebp - 0x14]
cmp byte [eax + 0x10], 0x49
jne 0x4151b4
mov eax, dword [ebp - 0x14]
xor edx, edx
mov dword [eax + 0x1b], edx
mov eax, dword [ebp - 0x14]
xor edx, edx
mov dword [eax + 0x1f], edx
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax + 0x15]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xa
jle 0x415176
mov dword [ebp - 0x34], 1
sub dword [ebp - 0x30], 0xa
jmp 0x41517b
xor eax, eax
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax + 0x16]
mov dword [ebp - 0x10], eax
sub dword [ebp - 0x20], 0xc
mov eax, dword [ebp - 0x14]
mov byte [eax + 0x16], 0
mov eax, dword [ebp - 0x14]
mov word [eax + 0x13], 0
mov al, byte [ebp - 0x30]
mov dl, byte [ebp - 0x34]
shl edx, 4
add al, dl
mov dl, byte [ebp - 0x10]
shl edx, 6
add al, dl
mov edx, dword [ebp - 0x14]
mov byte [edx + 0x15], al
jmp 0x41521a
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 0x13]
shl eax, 0xa
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x1b], eax
mov eax, dword [ebp - 0x14]
mov al, byte [eax + 0x15]
and al, 0xf
and eax, 0xff
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax + 0x15]
shr eax, 4
and eax, 3
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax + 0x15]
shr eax, 6
and eax, 3
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x1b], 0
jne 0x41521a
mov eax, dword [ebp - 0x14]
xor edx, edx
mov dword [eax + 0x1f], edx
push ebp
lea eax, [ebp - 0x20]
mov edx, 4
call fcn.00414f84
pop ecx
jmp 0x41521a
mov byte [ebp - 0x29], 0
cmp byte [ebp - 0x29], 0
je 0x41534f
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x17]
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x27], eax
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x1b], 0
jne 0x415260
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0x20]
call fcn.004139d8
push ebp
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x27]
mov eax, dword [ebp - 0x20]
call fcn.00414fb4
pop ecx
jmp 0x415321
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x1b]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0x38]
call fcn.004139d8
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x27]
mov eax, dword [ebp - 0x14]
call fcn.004139d8
xor eax, eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x48], eax
xor eax, eax
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x27]
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x1b]
cdq
idiv ecx
inc eax
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
test eax, eax
jle 0x415321
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x28], 1
push ebp
lea eax, [ebp - 0x40]
mov edx, 4
call fcn.00414f84
pop ecx
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x38]
jle 0x4152e0
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0x40]
call fcn.00413a08
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x38], eax
push ebp
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x4c]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x1b]
mov eax, dword [ebp - 0x40]
call fcn.00414fb4
pop ecx
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x44]
call fcn.004025e0
lea eax, [ebp - 0x4c]
call fcn.00413a50
mov eax, dword [ebp - 0x44]
add dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x44]
add dword [ebp - 0x24], eax
inc dword [ebp - 0x28]
dec dword [ebp - 0x50]
jne 0x4152b8
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x24]
mov dword [eax + 0x27], edx
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x17]
cmp eax, dword [ebp - 0x24]
setne al
mov edx, dword [ebp - 0x14]
mov byte [edx + 0x2b], al
lea eax, [ebp - 0xc]
call fcn.00413a50
jmp 0x415397
mov eax, dword [ebp - 0x14]
mov byte [eax + 0xe], 0
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x20]
mov dword [eax + 0x27], edx
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x27]
mov eax, dword [ebp - 0x14]
call fcn.004139d8
push 0
push 0
push 0
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_SetFilePointer
push ebp
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x27]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00414f84
pop ecx
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x27]
mov edx, dword [ebp - 0x14]
mov dword [edx + 4], eax
jmp 0x4153e1
cmp dword [ebp - 8], 0
jbe 0x4153b4
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x14]
mov byte [eax + 0x2b], 1
mov eax, dword [ebp - 0x14]
mov byte [eax + 0xd], 1
mov eax, dword [ebp - 0x14]
xor edx, edx
mov dword [eax + 0x27], edx
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 4]
mov eax, dword [ebp - 0x14]
call fcn.004139d8
mov eax, dword [ebp - 0x14]
xor edx, edx
mov dword [eax + 0x23], edx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x415406
lea eax, [ebp - 0x18]
call fcn.004030ac
ret