Function at 0x40503c
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
push dword [ebp + 0xc]
mov esi, eax
lea eax, [esi + 0x40]
lea edi, [ebp - 0x1c]
call fcn.00403dde
lea eax, [esi + 0x44]
lea edi, [ebp - 0x18]
mov dword [esp], 0x409658
call fcn.00403e38
mov eax, dword [ebp - 0x18]
mov esi, dword [eax - 0xc]
mov eax, dword [ebp - 0x1c]
add esi, dword [eax - 0xc]
pop ecx
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push ebx
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
setne byte [ebp + 0xf]
xor edi, edi
cmp byte [ebp + 0xf], 0
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], edi
je 0x4052d6
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
setne byte [ebp + 0xf]
cmp byte [ebp + 0xf], bl
mov dword [ebp - 0xc], eax
mov edi, eax
je 0x4052d6
push ebx
lea esi, [edi + esi + 0xd]
push esi
push ebx
push 4
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, ebx
setne byte [ebp + 0xf]
cmp byte [ebp + 0xf], bl
mov dword [ebp - 0x24], eax
je 0x4052c8
push esi
push ebx
push ebx
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
setne byte [ebp + 0xf]
cmp byte [ebp + 0xf], bl
mov dword [ebp - 0x10], eax
je 0x4052ba
lea esi, [edi - 9]
cmp esi, ebx
mov byte [ebp - 2], bl
mov byte [ebp + 0xb], bl
mov dword [ebp - 8], eax
jl 0x40513d
push 9
push str._Strings_
push 9
push dword [ebp - 8]
push 1
push 0x800
call dword [sym.imp.KERNEL32.dll_CompareStringA]
cmp eax, 2
je 0x40517e
inc ebx
inc dword [ebp - 8]
cmp ebx, esi
jle 0x405117
mov eax, dword [ebp - 0x10]
add eax, edi
mov dword [ebp - 8], eax
mov ebx, edi
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax - 0xc]
test ecx, ecx
mov edx, dword [ebp - 8]
mov dword [ebp - 0x20], edx
mov edi, ebx
je 0x4051e4
cmp ebx, dword [ebp - 0xc]
mov al, byte [ebp + 0xb]
mov byte [ebp - 1], al
jge 0x4051e4
cmp byte [ebp - 1], 0
mov al, byte [edx]
jne 0x4051c2
cmp al, 0xd
je 0x405178
cmp al, 0xa
jne 0x4051da
mov byte [ebp - 1], 1
jmp 0x4051da
add dword [ebp - 8], 9
mov byte [ebp - 2], 1
add ebx, 9
jmp 0x40519c
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0xd
je 0x4051a2
cmp al, 0xa
je 0x4051a2
inc ebx
inc dword [ebp - 8]
cmp ebx, edi
jl 0x40518b
jmp 0x405147
inc dword [ebp - 8]
inc ebx
cmp ebx, edi
mov byte [ebp + 0xb], 1
jge 0x405147
mov eax, dword [ebp - 8]
cmp byte [eax - 1], 0xd
jne 0x405147
cmp byte [eax], 0xa
jne 0x405147
inc dword [ebp - 8]
inc ebx
jmp 0x405147
cmp al, 0x5b
je 0x4051e4
cmp al, 0x20
je 0x4051da
cmp al, 9
je 0x4051da
cmp al, 0xd
je 0x4051da
cmp al, 0xa
je 0x4051da
mov byte [ebp - 1], 0
inc edx
inc edi
cmp edi, dword [ebp - 0xc]
mov dword [ebp - 0x20], edx
jl 0x405168
cmp byte [ebp - 2], 0
mov eax, dword [ebp - 0x1c]
mov esi, dword [eax - 0xc]
jne 0x4051f5
add esi, 0xd
jmp 0x4051fd
cmp byte [ebp + 0xb], 0
jne 0x4051fd
inc esi
inc esi
add ecx, esi
cmp edi, dword [ebp - 0xc]
mov dword [ebp - 0x2c], ecx
jge 0x40522d
mov eax, dword [ebp - 0xc]
sub eax, edi
dec eax
js 0x40522d
mov edx, dword [ebp - 0x10]
add ecx, edi
add ecx, edx
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x28]
add ecx, edi
mov cl, byte [ecx + eax]
mov byte [edx + eax], cl
dec eax
jns 0x405219
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax - 0xc]
test eax, eax
je 0x405247
push eax
push dword [ebp - 0x18]
lea eax, [esi + edx]
push eax
call fcn.00407db0
add esp, 0xc
cmp ebx, edi
jge 0x405263
sub edi, ebx
dec edi
js 0x405263
mov eax, dword [ebp - 0x10]
add esi, ebx
lea ecx, [ebx + eax]
add eax, esi
mov dl, byte [ecx + edi]
mov byte [eax + edi], dl
dec edi
jns 0x40525a
cmp byte [ebp - 2], 0
jne 0x405281
push 0xd
push str._r_n_Strings__r_n
push dword [ebp - 8]
call fcn.00407db0
add esp, 0xc
add dword [ebp - 8], 0xd
jmp 0x40529d
cmp byte [ebp + 0xb], 0
jne 0x40529d
push 2
push 0x409658
push dword [ebp - 8]
call fcn.00407db0
add esp, 0xc
add dword [ebp - 8], 2
mov eax, dword [ebp - 0x1c]
push dword [eax - 0xc]
push eax
push dword [ebp - 8]
call fcn.00407db0
mov eax, dword [ebp - 0x2c]
add dword [ebp - 0xc], eax
mov edi, dword [ebp - 0xc]
add esp, 0xc
xor ebx, ebx
cmp dword [ebp - 0x10], ebx
je 0x4052c8
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x24], ebx
je 0x4052d6
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], 0xffffffff
je 0x405313
cmp byte [ebp + 0xf], 0
je 0x40530a
push ebx
push ebx
push edi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
setne byte [ebp + 0xf]
cmp byte [ebp + 0xf], 0
je 0x40530a
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
setne byte [ebp + 0xf]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
call fcn.00404c4b
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.00404c4b
mov al, byte [ebp + 0xf]
pop edi
pop esi
pop ebx
leave
ret 8