Function at 0x40d390
Capabilities:
Get file size

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x44e78c
push eax
mov dword fs:[0], esp
sub esp, 0xc8
push ebx
push ebp
push esi
mov esi, ecx
push edi
cmp byte [esi + 0x10], 0xdb
je 0x40d3c4
xor edi, edi
push edi
call fcn.0040d250
add esp, 4
jmp 0x40d3c6
xor edi, edi
mov eax, dword [esi + 0x14]
cmp eax, edi
je 0x40d3e0
mov cl, byte [esi + 0x11]
test cl, cl
jne 0x40d3dd
push eax
call fcn.0042941f
add esp, 4
mov dword [esi + 0x14], edi
lea ecx, [esp + 0x50]
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], edi
mov byte [esi + 0x11], 0
call fcn.00408850
mov eax, dword [esp + 0xe8]
lea ecx, [esp + 0x50]
push eax
mov dword [esp + 0xe4], edi
call fcn.00408b70
lea ecx, [esp + 0x18]
call fcn.0041f9d0
mov ebx, dword [esp + 0xec]
lea ecx, [esp + 0x24]
push ebx
lea edx, [esp + 0x54]
push ecx
lea eax, [esp + 0x20]
push edx
push eax
mov byte [esp + 0xf0], 1
call fcn.0040ca60
add esp, 0x10
test al, al
je 0x40d4fe
mov ecx, dword [esp + 0x1c]
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x40d49c
cmp ebx, edi
je 0x40d4fe
lea ecx, [esp + 0x28]
call fcn.00405dd0
lea ecx, [esp + 0x28]
mov byte [esp + 0xe0], 2
call fcn.00406970
mov esi, dword [ebx]
lea ecx, [esp + 0x28]
call fcn.0040f5f0
push eax
mov ecx, ebx
call dword [esi + 0x10]
lea ecx, [esp + 0x28]
mov byte [esp + 0xe0], 1
call fcn.004060c0
jmp 0x40d4fe
cmp ebp, edi
jne 0x40d4cc
lea ecx, [esp + 0x18]
mov byte [esp + 0xe0], 0
call fcn.0041fa80
lea ecx, [esp + 0x50]
mov dword [esp + 0xe0], 0xffffffff
call fcn.00408920
mov al, 1
jmp 0x40d5e7
lea edi, [ebp + 4]
push edi
call fcn.004298da
mov edx, eax
add esp, 4
test edx, edx
mov dword [esi + 0x14], edx
jne 0x40d52a
test ebx, ebx
je 0x40d4fe
mov edx, dword [ebx]
push str.Out_of_memory_when_loading_Unicode_file_into_data_buffer.
mov ecx, ebx
call dword [edx + 0x10]
mov eax, dword [ebx]
push ebp
push str.fileSize
mov ecx, ebx
call dword [eax + 0x2c]
lea ecx, [esp + 0x18]
mov byte [esp + 0xe0], 0
call fcn.0041fa80
lea ecx, [esp + 0x50]
mov dword [esp + 0xe0], 0xffffffff
call fcn.00408920
xor al, al
jmp 0x40d5e7
mov ecx, edi
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebx
and ecx, 3
rep stosb byte es:[edi], al
mov edx, dword [esi + 0x14]
lea eax, [esp + 0x17]
lea ecx, [esp + 0x18]
push eax
push ecx
push ebp
push edx
lea ecx, [esp + 0x2c]
mov dword [esi + 0x18], ebp
mov dword [esi + 0x1c], ebp
mov dword [esp + 0x28], 0
call fcn.0041fdf0
test al, al
mov byte [esp + 0x12], 1
jne 0x40d5b3
test ebx, ebx
je 0x40d5ae
lea ecx, [esp + 0x28]
call fcn.00405dd0
lea ecx, [esp + 0x28]
mov byte [esp + 0xe0], 3
call fcn.00406970
mov esi, dword [ebx]
lea ecx, [esp + 0x28]
call fcn.0040f5f0
push eax
mov ecx, ebx
call dword [esi + 0x10]
lea ecx, [esp + 0x28]
mov byte [esp + 0xe0], 1
call fcn.004060c0
mov byte [esp + 0x12], 0
cmp dword [esp + 0x14], ebp
je 0x40d5be
mov byte [esp + 0x12], 0
lea ecx, [esp + 0x18]
mov byte [esp + 0xe0], 0
call fcn.0041fa80
lea ecx, [esp + 0x50]
mov dword [esp + 0xe0], 0xffffffff
call fcn.00408920
mov al, byte [esp + 0x12]
mov ecx, dword [esp + 0xd8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xd4
ret 8