Function at 0x4041ae
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x6cc]
sub esp, 0x74c
mov eax, dword [0x412020]
xor eax, ebp
mov dword [ebp + 0x6c8], eax
mov eax, dword [ebp + 0x6d8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x6d4]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x54]
xor esi, esi
push eax
mov ebx, 0x104
push ebx
push edi
mov dword [ebp - 0x80], edi
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x7c], esi
mov byte [ebp - 0x59], 0
call fcn.004030e9
cmp eax, esi
jne 0x40427b
cmp byte [0x414024], 0
jne 0x404252
mov esi, 0x400
push esi
mov ebx, 0x413008
push ebx
push 0x7f0
push dword [0x414020]
call fcn.0040340e
test eax, eax
je 0x404252
push edi
push ebx
push esi
mov edi, 0x413808
push edi
call fcn.00403c6d
add esp, 0x10
test eax, eax
jl 0x404252
push edi
call fcn.0040378f
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x404262
call esi
jmp 0x40426e
call esi
and eax, 0xffff
or eax, 0x80070000
push eax
call fcn.00403c94
xor al, al
jmp 0x4046d3
cmp eax, ebx
jbe 0x4042c5
cmp byte [0x414024], 0
jne 0x404274
mov esi, 0x400
push esi
mov ebx, 0x413008
push ebx
push 0x7f1
push dword [0x414020]
call fcn.0040340e
test eax, eax
je 0x404274
push edi
push ebx
push esi
mov edi, 0x413808
push edi
call fcn.00403c6d
add esp, 0x10
test eax, eax
jl 0x404274
push edi
call fcn.0040378f
jmp 0x404274
mov eax, dword [ebp - 0x70]
push esi
push esi
push 3
push esi
push 1
push 0x80000000
push edi
mov word [eax], si
call fcn.004036c2
cmp eax, 0xffffffff
mov dword [ebp - 0x78], eax
jne 0x404301
cmp byte [0x414024], 0
jne 0x404274
mov esi, 0x400
push esi
mov ebx, 0x413008
push ebx
push 0x7f2
jmp 0x404299
push 0
lea eax, [ebp - 0x68]
push eax
call dword [0x414008]
test eax, eax
mov dword [ebp - 0x58], eax
mov ebx, 0x413008
mov esi, 0x400
mov edi, 0x413808
jge 0x404350
cmp byte [0x414024], 0
jne 0x404348
push esi
push edi
push 0x7da
push dword [0x414020]
call fcn.0040340e
test eax, eax
je 0x404348
push edi
call fcn.0040378f
push dword [ebp - 0x58]
jmp 0x4045dc
lea eax, [ebp + 0x5c4]
mov dword [ebp - 0x58], eax
mov byte [ebp + 0x5c4], 0
lea eax, [ebp + 0x6c8]
cmp dword [ebp - 0x58], eax
jae 0x404539
push 0
lea eax, [ebp - 0x74]
push eax
push 1
push dword [ebp - 0x58]
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404565
cmp dword [ebp - 0x74], 0
je 0x4043b6
mov ecx, dword [ebp - 0x58]
mov al, byte [ecx]
cmp al, 0xa
je 0x4043c5
cmp al, 0xd
je 0x404360
cmp al, 0x20
je 0x4043a6
cmp al, 9
jne 0x4043b1
lea eax, [ebp + 0x5c4]
cmp dword [ebp - 0x58], eax
je 0x404360
inc dword [ebp - 0x58]
jmp 0x404360
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x7c], 1
mov byte [eax], 0
jmp 0x4043c8
mov byte [ecx], 0
lea eax, [ebp + 0x5c4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x40451c
push 0x104
lea eax, [ebp + 0x1b4]
push eax
push 0xffffffffffffffff
lea eax, [ebp + 0x5c4]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x404594
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp + 0x1b4]
push eax
call ebx
lea ecx, [ebp - 0x54]
push ecx
mov dword [ebp - 0x58], eax
call ebx
mov ecx, dword [ebp - 0x58]
lea eax, [ecx + eax + 1]
cmp eax, 0x104
jg 0x4045e3
lea eax, [ebp + 0x1b4]
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp + 0x3bc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
test eax, eax
je 0x4046ed
push dword [ebp - 0x6c]
inc dword [ebp - 0x64]
call fcn.00403f40
push dword [ebp - 0x6c]
mov eax, dword [ebp - 0x68]
mov ecx, dword [eax]
lea edx, [ebp + 0x3bc]
push edx
push dword [ebp + 0x6dc]
push eax
call dword [ecx + 0x1c]
cmp eax, 1
mov dword [ebp - 0x58], eax
mov ebx, 0x413008
jne 0x404495
cmp byte [0x414024], 0
jne 0x40451c
push esi
push ebx
push 0x7f5
jmp 0x4044a9
test eax, eax
jl 0x4044d6
cmp byte [0x414024], 0
jne 0x40451c
push esi
push ebx
push 0x7f6
push dword [0x414020]
call fcn.0040340e
test eax, eax
je 0x40451c
lea eax, [ebp + 0x3bc]
push eax
push ebx
push esi
push edi
call fcn.00403c6d
add esp, 0x10
test eax, eax
jl 0x40451c
push edi
call fcn.0040378f
jmp 0x40451c
cmp byte [0x414024], 0
jne 0x404511
push esi
push ebx
push 0x7f7
push dword [0x414020]
call fcn.0040340e
test eax, eax
je 0x404511
lea eax, [ebp + 0x3bc]
push eax
push ebx
push esi
push edi
call fcn.00403c6d
add esp, 0x10
test eax, eax
jl 0x404511
push edi
call fcn.0040378f
push dword [ebp - 0x58]
call fcn.00403c94
inc dword [ebp - 0x60]
cmp dword [ebp - 0x7c], 0
je 0x404350
cmp dword [ebp - 0x60], 0
jne 0x40460d
mov byte [ebp - 0x59], 1
jmp 0x40460d
cmp byte [0x414024], 0
jne 0x40460d
push esi
push edi
push 0x7dd
push dword [0x414020]
call fcn.0040340e
test eax, eax
je 0x40460d
jmp 0x404733
cmp byte [0x414024], 0
jne 0x40460d
push esi
push ebx
push 0x7f3
push dword [0x414020]
call fcn.0040340e
test eax, eax
je 0x40460d
push dword [ebp - 0x80]
jmp 0x404720
cmp byte [0x414024], 0
jne 0x4045b9
push esi
push edi
push 0x7da
push dword [0x414020]
call fcn.0040340e
test eax, eax
je 0x4045b9
push edi
call fcn.0040378f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x4045cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4045db
call dword [sym.imp.KERNEL32.dll_GetLastError]
and eax, 0xffff
or eax, 0x80070000
push eax
call fcn.00403c94
jmp 0x40460d
cmp byte [0x414024], 0
jne 0x404608
push esi
push edi
push 0x7dd
push dword [0x414020]
call fcn.0040340e
test eax, eax
je 0x404608
push edi
call fcn.0040378f
mov ebx, 0x413008
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x40461a
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x414024], 0
jne 0x4046d0
push esi
push ebx
push 0x7f8
push dword [0x414020]
call fcn.0040340e
test eax, eax
je 0x40465e
push dword [ebp - 0x64]
push ebx
push esi
push edi
call fcn.00403c6d
add esp, 0x10
test eax, eax
jl 0x40465e
push edi
call fcn.0040378f
cmp byte [0x414024], 0
jne 0x4046d0
push esi
push ebx
push 0x7f9
push dword [0x414020]
call fcn.0040340e
test eax, eax
je 0x404699
mov eax, dword [ebp - 0x64]
sub eax, dword [ebp - 0x60]
push eax
push ebx
push esi
push edi
call fcn.00403c6d
add esp, 0x10
test eax, eax
jl 0x404699
push edi
call fcn.0040378f
cmp byte [0x414024], 0
jne 0x4046d0
push esi
push ebx
push 0x7fb
push dword [0x414020]
call fcn.0040340e
test eax, eax
je 0x4046d0
push dword [ebp - 0x60]
push ebx
push esi
push edi
call fcn.00403c6d
add esp, 0x10
test eax, eax
jl 0x4046d0
push edi
call fcn.0040378f
mov al, byte [ebp - 0x59]
mov ecx, dword [ebp + 0x6c8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004067fe
add ebp, 0x6cc
leave
ret 0xc
cmp byte [0x414024], 0
jne 0x404608
push esi
mov ebx, 0x413008
push ebx
push 0x7f4
push dword [0x414020]
call fcn.0040340e
test eax, eax
je 0x40460d
lea eax, [ebp + 0x1b4]
push eax
push ebx
push esi
push edi
call fcn.00403c6d
add esp, 0x10
test eax, eax
jl 0x40460d
push edi
call fcn.0040378f
jmp 0x40460d