Function at 0x41d470
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x55da81
mov eax, dword fs:[0]
push eax
sub esp, 0x860
mov eax, dword [0x5b5be8]
xor eax, esp
mov dword [esp + 0x858], eax
push ebx
push esi
push edi
mov eax, dword [0x5b5be8]
xor eax, esp
push eax
lea eax, [esp + 0x870]
mov dword fs:[0], eax
mov esi, ecx
lea eax, [esi + 0xa0]
push eax
lea ecx, [esi + 0xd8]
push ecx
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x1c], esi
call fcn.0041f320
add esp, 0xc
xor ebx, ebx
mov dword [esp + 0x878], ebx
cmp dword [esp + 0x34], 0x10
mov eax, dword [esp + 0x20]
jae 0x41d4e9
lea eax, [esp + 0x20]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, ebx
je 0x41d50f
cmp edi, 0xffffffff
jne 0x41d5e0
cmp byte [esi + 0x40], bl
jne 0x41d529
cmp dword [esp + 0x34], 0x10
jb 0x41d6ed
mov eax, dword [esp + 0x20]
push eax
jmp 0x41d6e5
push 0x3ff
lea ecx, [esp + 0x69]
push ebx
push ecx
mov byte [esp + 0x70], bl
call fcn.00535390
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push 0x400
lea edx, [esp + 0x6c]
push edx
push ebx
mov edi, eax
push edi
push ebx
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push 0x3ff
lea eax, [esp + 0x469]
push ebx
push eax
mov byte [esp + 0x470], bl
call fcn.00535390
mov eax, dword [esp + 0x2c]
mov esi, 0x10
add esp, 0xc
cmp dword [esp + 0x34], esi
jae 0x41d591
lea eax, [esp + 0x20]
push eax
push edi
lea ecx, [esp + 0x6c]
push ecx
push str._s__d_____s
mov eax, 0x400
lea edx, [esp + 0x474]
call fcn.00422400
add esp, 0x10
push esi
push str.Rappelz
lea edx, [esp + 0x46c]
push edx
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp dword [esp + 0x34], esi
jb 0x41d5d9
mov eax, dword [esp + 0x20]
push eax
call fcn.004310e1
add esp, 4
xor al, al
jmp 0x41d6ef
push 1
push ebx
push ebx
push edi
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp esi, eax
jae 0x41d6d2
xor ecx, ecx
mov dword [esp + 0x50], 0xf
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov word [esp + 0x60], cx
mov edx, dword [esp + 0x10]
mov byte [esp + 0x878], 1
mov eax, dword [edx + 4]
push eax
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x1c]
mov ecx, edi
call fcn.0041b350
test al, al
je 0x41d6be
lea eax, [esp + 0x3c]
lea esi, [esp + 0x18]
call fcn.0041e7b0
mov ecx, dword [esp + 0x10]
mov byte [esp + 0x878], 2
mov eax, dword [esp + 0x1c]
add ecx, 8
xor edx, edx
div dword [ecx + 4]
mov eax, esi
push eax
push edx
push ecx
lea ecx, [esp + 0x48]
call fcn.0041e920
mov ecx, dword [esp + 0x18]
push ecx
call fcn.004310e1
add esp, 4
mov byte [esp + 0x878], bl
cmp dword [esp + 0x50], 0x10
jb 0x41d69f
mov edx, dword [esp + 0x3c]
push edx
call fcn.004310e1
add esp, 4
push 1
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp esi, eax
jb 0x41d601
jmp 0x41d6d2
cmp dword [esp + 0x50], 0x10
jb 0x41d6d2
mov eax, dword [esp + 0x3c]
push eax
call fcn.004310e1
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x34], 0x10
jb 0x41d6ed
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004310e1
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x870]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x858]
xor ecx, esp
call fcn.005320a3
mov esp, ebp
pop ebp
ret