Function at 0x4030b0
Capabilities:
Read file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov edi, dword [esp + 0x34]
xor ebp, ebp
test edi, edi
je 0x403388
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4030df
xor esi, esi
cmp byte [eax], 0
je 0x4030df
mov dword [esp + 0x14], eax
xor ebx, ebx
jmp 0x403176
push 0x2e
push edi
call sub.msvcrt.dll_strchr
add esp, 8
test eax, eax
je 0x403388
inc eax
push eax
call sub.msvcrt.dll__strdup
add esp, 4
mov ebx, eax
cmp byte [eax], 0x23
jne 0x40313a
push ebx
call sub.msvcrt.dll_strlen
add esp, 4
add eax, 5
push eax
call sub.msvcrt.dll_malloc
add esp, 4
mov esi, eax
mov eax, ebx
inc eax
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.00403570
add esp, 0xc
push ebx
call sub.msvcrt.dll_free
add esp, 4
mov ebx, esi
push edi
call sub.msvcrt.dll_strlen
add esp, 4
add eax, 5
push eax
call sub.msvcrt.dll_malloc
add esp, 4
mov esi, eax
push edi
push eax
call sub.msvcrt.dll_strcpy
add esp, 8
push 0x2e
push esi
call sub.msvcrt.dll_strchr
add esp, 8
mov dword [eax], 0x6c6c642e
mov byte [eax + 4], 0
mov dword [esp + 0x14], ebx
mov edi, esi
push edi
call sub.msvcrt.dll_strlen
add esp, 4
add eax, 5
push eax
call sub.msvcrt.dll_malloc
add esp, 4
push edi
mov edi, eax
push eax
call sub.msvcrt.dll_strcpy
add esp, 8
push edi
call fcn.00403710
add esp, 4
push 0x2e
push edi
call sub.msvcrt.dll_strchr
add esp, 8
test eax, eax
je 0x4031e5
mov byte [eax + 4], 0
mov dword [eax], 0x6665642e
push dword [esp + 0x14]
call sub.msvcrt.dll_strlen
add esp, 4
mov dword [esp + 0xc], eax
xor ebp, ebp
test edi, edi
je 0x40336a
mov dword [esp + 4], 0
cmp byte [edi], 0
jne 0x40321c
jmp 0x403358
push edi
call sub.msvcrt.dll_strlen
add esp, 4
mov dword [edi + eax], 0x6665642e
mov byte [edi + eax + 4], 0
push dword [esp + 0x14]
call sub.msvcrt.dll_strlen
add esp, 4
mov dword [esp + 0xc], eax
test edi, edi
sete al
mov dword [esp + 4], eax
cmp byte [edi], 0
je 0x403358
push edi
call sub.msvcrt.dll__strdup
add esp, 4
test eax, eax
je 0x403358
mov ebp, eax
mov dword [esp], edi
mov dword [esp + 8], esi
push eax
call fcn.00403710
add esp, 4
mov esi, 0x40d0b4
mov edi, dword [sym.imp.msvcrt.dll__stricmp]
nop word [eax + eax]
mov esi, dword [esi]
test esi, esi
je 0x403392
push ebp
push dword [esi + 4]
call edi
add esp, 8
test eax, eax
jne 0x403250
push ebp
call sub.msvcrt.dll_free
add esp, 4
mov esi, dword [esi + 8]
test esi, esi
mov edi, dword [esp]
je 0x40354b
xor ebp, ebp
cmp byte [esi], 0
jne 0x403299
jmp 0x40354d
cmp byte [esi], 0
je 0x40345e
push 0xa
push esi
call sub.msvcrt.dll_strchr
add esp, 8
test eax, eax
je 0x40345e
mov edi, eax
lea esi, [eax + 1]
push dword [esp + 0xc]
push dword [esp + 0x18]
push esi
call sub.msvcrt.dll_strncmp
add esp, 0xc
test eax, eax
jne 0x403290
mov eax, dword [esp + 0xc]
movzx eax, byte [esi + eax]
cmp al, 0x40
je 0x4032d8
dec al
cmp al, 0x1f
ja 0x403290
mov eax, dword [esp + 0xc]
movzx eax, byte [esi + eax + 1]
mov edx, eax
add dl, 0xd0
xor ecx, ecx
cmp dl, 9
ja 0x403312
mov ecx, dword [esp + 0xc]
lea edx, [ecx + edi]
add edx, 3
xor ecx, ecx
lea ecx, [ecx + ecx*4]
add al, 0xd0
movzx eax, al
lea ecx, [eax + ecx*2]
movzx eax, byte [edx]
mov ah, al
add ah, 0xd0
inc edx
cmp ah, 0xa
jb 0x4032f9
mov eax, dword [esp + 0xc]
add esi, eax
inc esi
mov eax, dword [esp + 0x40]
mov dword [eax], ecx
mov edi, dword [esp]
mov ebp, dword [esp + 0x3c]
movzx eax, byte [esi]
test eax, eax
je 0x40334e
cmp eax, 0xa
je 0x40334e
push 4
push str.DATA
push esi
call sub.msvcrt.dll_strncmp
add esp, 0xc
inc esi
test eax, eax
jne 0x403326
mov dword [ebp], 1
mov ebp, 1
jmp 0x40354d
xor ebp, ebp
cmp byte [esp + 4], 0
jne 0x40336a
push edi
call sub.msvcrt.dll_free
add esp, 4
test esi, esi
je 0x40337b
cmp ebx, esi
je 0x40337b
push esi
call sub.msvcrt.dll_free
add esp, 4
test ebx, ebx
je 0x403388
push ebx
call sub.msvcrt.dll_free
add esp, 4
mov eax, ebp
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp + 0x18], ebx
mov ebx, dword [0x40d0b8]
push 0x40b072
push dword [esp + 4]
call sub.msvcrt.dll_fopen
add esp, 8
mov edi, eax
test eax, eax
je 0x403466
push 2
push 0
push edi
call sub.msvcrt.dll_fseek
add esp, 0xc
push edi
call sub.msvcrt.dll_ftell
add esp, 4
mov ebx, eax
push 0
push 0
push edi
call sub.msvcrt.dll_fseek
add esp, 0xc
lea eax, [ebx + 1]
push eax
call sub.msvcrt.dll_malloc
add esp, 4
test eax, eax
je 0x4034ef
mov esi, eax
push edi
push ebx
push 1
push eax
call sub.msvcrt.dll_fread
add esp, 0x10
mov dword [esp + 0x10], eax
push edi
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, ebx
mov dword [esp + 0x1c], ebx
cmp dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x18]
jne 0x40350e
mov eax, dword [esp + 0x1c]
mov byte [esi + eax], 0
push 0x10
push 1
call sub.msvcrt.dll_calloc
add esp, 8
test eax, eax
mov edi, dword [esp]
je 0x403539
mov dword [eax + 4], ebp
mov dword [eax + 8], esi
mov ecx, dword [esp + 0x1c]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x40d0b4]
mov dword [eax], ecx
mov dword [0x40d0b4], eax
jmp 0x40327e
mov edi, dword [esp]
jmp 0x40354d
mov dword [esp + 0x10], ebp
test ebx, ebx
je 0x4034e9
mov ebp, dword [esp]
jmp 0x403486
mov ebx, dword [ebx]
test ebx, ebx
je 0x4034e9
push ebp
call sub.msvcrt.dll_strlen
add esp, 4
mov esi, eax
lea edi, [ebx + 4]
push edi
call sub.msvcrt.dll_strlen
add esp, 4
add eax, esi
inc eax
push eax
call sub.msvcrt.dll_malloc
add esp, 4
test eax, eax
je 0x403480
push edi
push eax
mov esi, eax
call sub.msvcrt.dll_strcpy
add esp, 8
push ebp
push esi
call sub.msvcrt.dll_strcat
add esp, 8
push 0x40b072
push esi
call sub.msvcrt.dll_fopen
add esp, 8
mov edi, eax
push esi
call sub.msvcrt.dll_free
add esp, 4
test edi, edi
je 0x403480
mov ebp, dword [esp + 0x10]
jmp 0x4033b7
push dword [esp + 0x10]
jmp 0x4034f9
push edi
call sub.msvcrt.dll_fclose
add esp, 4
push ebp
call sub.msvcrt.dll_free
add esp, 4
xor ebp, ebp
cmp byte [esp + 4], 0
mov ebx, dword [esp + 0x18]
jmp 0x403527
push ebp
call sub.msvcrt.dll_free
add esp, 4
push esi
call sub.msvcrt.dll_free
add esp, 4
xor ebp, ebp
cmp byte [esp + 4], 0
mov esi, dword [esp + 8]
mov edi, dword [esp]
je 0x403361
jmp 0x40336a
push ebp
call sub.msvcrt.dll_free
add esp, 4
push esi
call sub.msvcrt.dll_free
add esp, 4
xor ebp, ebp
cmp byte [esp + 4], 0
mov esi, dword [esp + 8]
je 0x403361
jmp 0x40336a