Function at 0x405480
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41f668
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x43f7ac]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
xor edi, edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x18], edi
push 0xffffffffffffffff
push str.LoadINISections
mov eax, dword [esi + 0x138]
push eax
lea ecx, [ebp - 0x34]
call fcn.00408160
mov dword [ebp - 4], edi
mov byte [ebp - 4], 1
add dword [esi + 0x134], 1
cmp dword [esi + 0x12c], edi
jne 0x405749
push edi
push edi
push 3
push edi
push 3
push SysReAllocStringLen
lea ecx, [esi + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
jne 0x405526
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.00408240
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x405503
lea eax, [ebx + 1]
push eax
call fcn.0040db80
mov edi, eax
mov dword [ebp - 0x18], edi
lea eax, [ebx + 1]
push eax
push 0
push edi
call fcn.0040feb0
add esp, 0x10
test edi, edi
je 0x405503
push 0
lea edx, [ebp - 0x2c]
push edx
push ebx
push edi
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405503
mov byte [edi + ebx], 0
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x421b74
push edi
call fcn.00410f20
mov dword [ebp - 0x14], eax
add esp, 8
jmp 0x405590
test eax, eax
je 0x4055c7
add dword [esi + 0x130], 1
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, edi
lea ebx, [ecx + 1]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x4055a6
sub ecx, ebx
add ecx, edi
cmp eax, ecx
jae 0x405590
push 0x421b70
push eax
call fcn.00410f20
mov dword [ebp - 0x14], eax
jmp 0x405588
xor ecx, ecx
mov eax, dword [esi + 0x130]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040db80
mov dword [esi + 0x12c], eax
push 0x421b74
push edi
call fcn.00410f20
add esp, 0xc
mov dword [ebp - 0x14], eax
xor edi, edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x1c], edi
jmp 0x405610
mov eax, dword [ebp - 0x1c]
cmp eax, dword [esi + 0x130]
jae 0x40573a
push 0x421b6c
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00410f20
add esp, 8
mov ebx, eax
mov dword [ebp - 0x20], ebx
test ebx, ebx
je 0x405731
push 0xc
call fcn.0040db80
mov edx, dword [esi + 0x12c]
mov dword [edx + edi*4], eax
sub ebx, dword [ebp - 0x14]
push ebx
call fcn.0040db80
mov ecx, dword [esi + 0x12c]
mov edx, dword [ecx + edi*4]
mov dword [edx], eax
add ebx, 0xffffffff
push ebx
mov ebx, dword [ebp - 0x14]
lea eax, [ebx + 1]
push eax
mov ecx, dword [esi + 0x12c]
mov edx, dword [ecx + edi*4]
mov eax, dword [edx]
push eax
call fcn.00410120
mov ecx, dword [esi + 0x12c]
mov edx, dword [ecx + edi*4]
mov ecx, dword [edx]
sub ecx, ebx
mov eax, dword [ebp - 0x20]
mov byte [ecx + eax - 1], 0
add eax, 1
mov dword [ebp - 0x14], eax
push 0x421b70
push eax
call fcn.00410f20
add esp, 0x1c
mov ebx, eax
test ebx, ebx
jne 0x4056c2
mov edx, dword [ebp - 0x18]
mov eax, edx
lea ebx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4056b4
sub eax, ebx
lea ebx, [eax + edx]
mov eax, ebx
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
add eax, 1
push eax
call fcn.0040db80
mov edx, dword [esi + 0x12c]
mov ecx, dword [edx + edi*4]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [esi + 0x12c]
mov edx, dword [ecx + edi*4]
mov eax, dword [edx + 4]
push eax
call fcn.00410120
add esp, 0x10
mov ecx, dword [esi + 0x12c]
mov edx, dword [ecx + edi*4]
mov eax, dword [edx + 4]
sub eax, dword [ebp - 0x14]
mov byte [eax + ebx], 0
mov ecx, dword [esi + 0x12c]
mov eax, dword [ecx + edi*4]
mov edx, dword [eax + 4]
mov dword [eax + 8], edx
mov dword [ebp - 0x14], ebx
test ebx, ebx
je 0x40573a
add ebx, 1
mov dword [ebp - 0x14], ebx
add edi, 1
mov dword [ebp - 0x28], edi
add dword [ebp - 0x1c], 1
jmp 0x405610
mov dword [esi + 0x130], edi
mov dword [ebp - 0x24], 1
xor edi, edi
mov dword [ebp - 4], edi
jmp 0x40576e
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x18]
cmp eax, edi
je 0x405782
push eax
call fcn.0040dbc0
add esp, 4
mov dword [ebp - 4], edi
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.00408240
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret