Function at 0x4a216447
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x4a2340ac]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edi, dword [0x4a2340b4]
xor ebx, ebx
inc eax
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x218], ebx
cmp edi, ebx
je 0x4a216537
mov ecx, dword [esi + 0x3c]
cmp ecx, ebx
je 0x4a2246fd
push eax
push 0x80
lea eax, [ebp - 0x104]
push eax
push ecx
call fcn.4a21654d
mov eax, dword [edi + 8]
push edi
mov dword [ebp - 0x228], eax
call fcn.4a214d4e
mov dword [ebp - 0x208], eax
cmp eax, 0xffffffff
je 0x4a2201d6
push ebx
push eax
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push dword [esi + 0x3c]
mov dword [ebp - 0x21c], eax
call fcn.4a212b0d
mov esi, eax
cmp byte [0x4a234081], bl
je 0x4a216716
push 4
push str.:EOF
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4a216716
movzx eax, word [esi + 8]
cmp ax, bx
jne 0x4a21f6c7
mov eax, dword [ebp - 0x21c]
mov dword [edi + 8], eax
mov byte [0x4a2340b8], 1
push dword [ebp - 0x208]
call fcn.4a213ab3
mov eax, dword [ebp - 0x218]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.4a2113a9
leave
ret 4
push 0xa
push dword [ebp - 0x210]
call fcn.4a2118eb
mov esi, eax
cmp esi, ebx
je 0x4a2201ad
push ebx
push 0x80
lea eax, [ebp - 0x204]
push eax
push dword [ebp - 0x224]
call fcn.4a21654d
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x4a2166f7
mov eax, dword [ebp - 0x220]
mov al, byte [eax + 0x40]
and al, 1
mov byte [0x4a2340b8], al
call fcn.4a21661c
cmp esi, ebx
je 0x4a224784
test al, al
jne 0x4a2247a1
sub esi, 0x4a248640
inc esi
inc esi
sar esi, 1
add dword [edi + 8], esi
jmp 0x4a216709
cmp eax, 0x4a248640
je 0x4a2166d2
dec eax
dec eax
cmp word [eax], 0xa
mov dword [ebp - 0x210], eax
jne 0x4a2166bd
cmp word [eax], 0x3a
je 0x4a2166e0
inc eax
inc eax
mov dword [ebp - 0x210], eax
push ebx
push eax
call fcn.4a212b0d
cmp word [eax], 0x3a
mov dword [ebp - 0x224], eax
je 0x4a216640
push 0x3a
push esi
call fcn.4a2118eb
mov esi, eax
cmp esi, ebx
jne 0x4a2167c5
cmp byte [0x4a2340b8], 1
je 0x4a216526
call fcn.4a214b2a
mov esi, dword [sym.imp.msvcrt.dll__get_osfhandle]
push 1
push ebx
push ebx
push dword [ebp - 0x208]
call esi
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x228]
mov dword [edi + 8], eax
jl 0x4a21674c
cmp dword [ebp - 0x214], ebx
je 0x4a21f3fa
lea eax, [ebp - 0x20c]
push eax
push 0x200
push 0x4a248640
push dword [ebp - 0x208]
call esi
pop ecx
push eax
call fcn.4a2167d3
test eax, eax
je 0x4a21f3fa
mov eax, dword [ebp - 0x20c]
cmp eax, ebx
je 0x4a21f406
cmp eax, 0xffffffff
je 0x4a21f3fa
cmp word [0x4a248640], bx
je 0x4a21f3fa
cmp word [ebp - 0x104], bx
je 0x4a21f3fa
push 0x3a
xor ecx, ecx
push 0x4a248640
mov word [eax*2 + 0x4a248640], cx
call fcn.4a2118eb
mov esi, eax
cmp esi, ebx
je 0x4a216716
mov eax, esi
inc esi
inc esi
jmp 0x4a2166c6
cmp dword [ebp - 0x20c], ebx
jne 0x4a2201de
cmp dword [ebp - 0x214], ebx
je 0x4a2201de
push ebx
push ebx
push ebx
push dword [ebp - 0x208]
call esi
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x214], ebx
jmp 0x4a216716
push eax
call dword [sym.imp.msvcrt.dll_iswspace]
pop ecx
test eax, eax
jne 0x4a216516
jmp 0x4a216716
push 1
push ebx
push ebx
push dword [ebp - 0x208]
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x21c]
je 0x4a216657
jmp 0x4a224720
xor eax, eax
inc eax
jmp 0x4a216537
push edi
call fcn.4a2157f4
jmp 0x4a2247c7