Function at 0x407190
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x10], edx
push edi
mov ecx, 0x4021d0
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x44], 0x3b
call fcn.0041297b
mov ecx, dword [esi + 0x4c]
mov ebx, 1
xor edi, edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x40], 0
mov dword [ebp - 8], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x14], edi
test ecx, ecx
je 0x407870
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
cmp eax, 0x22
jne 0x41ec33
add ecx, 2
mov esi, eax
mov dword [ebp - 4], ecx
mov eax, ecx
mov dword [ebp - 0x1c], esi
test eax, eax
je 0x40786d
movzx edx, word [ecx]
test dx, dx
je 0x40737a
mov edi, edi
cmp dx, 0x20
jbe 0x4077d4
cmp word [ecx], si
je 0x40737a
push 8
push 0x402438
push ecx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x407aec
push 7
push 0x402458
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x41ec43
push 4
push 0x40244c
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x407ac8
push 7
push 0x402468
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x407736
push 5
push 0x402478
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x407b1e
push 7
push 0x402484
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x41ec59
mov ecx, dword [ebp - 4]
xor ebx, ebx
add ecx, 0xe
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
test ax, ax
je 0x407369
lea ecx, [ecx]
cmp ax, si
je 0x407369
cmp ax, 0x2a
je 0x407add
push 0
lea eax, [ebp - 4]
push eax
push ecx
call dword [sym.imp.msvcrt.dll_wcstol]
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x41ec59
mov ecx, dword [ebp - 4]
cmp word [ecx], 0x2d
je 0x407848
mov edx, esi
cmp edx, 0x20
jge 0x407354
cmp esi, edx
jg 0x407354
mov eax, edx
inc ebx
sub eax, esi
add ebx, eax
mov dword [ebp - 0x54], ebx
mov ebx, dword [ebp - 0x28]
mov edi, edi
lea eax, [esi - 1]
inc esi
bts ebx, eax
cmp esi, edx
jle 0x407340
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x28], ebx
mov ebx, dword [ebp - 0x54]
movzx eax, word [ecx]
cmp eax, 0x2c
je 0x40780b
cmp eax, 0x2a
je 0x407811
cmp ebx, dword [ebp - 8]
jle 0x407b4a
mov dword [ebp - 8], ebx
jmp 0x4077ad
cmp ebx, 1
jle 0x40786d
mov esi, dword [ebp - 0x10]
mov ecx, dword [0x42d58c]
add esi, ebx
lea edx, [esi*2 + 2]
call fcn.00410100
mov ecx, dword [0x42d588]
lea edx, [esi*4 + 4]
mov dword [0x42d58c], eax
call fcn.00410100
mov ecx, dword [0x42d58c]
mov dword [0x42d588], eax
test ecx, ecx
je 0x41ec75
test eax, eax
je 0x41ec75
mov edx, 1
cmp ebx, edx
jle 0x407416
mov ebx, dword [ebp - 0x10]
add ecx, 2
mov edi, dword [ebp - 0x18]
lea esi, [ebx + 1]
lea ebx, [ecx + ebx*2]
mov ecx, dword [ebp - 8]
lea esi, [eax + esi*4]
lea ebx, [ebx]
mov ax, word [edi + 0x44]
lea ebx, [ebx + 2]
add ax, dx
lea esi, [esi + 4]
mov word [ebx - 2], ax
inc edx
mov dword [esi - 4], 0
cmp edx, ecx
jl 0x4073f0
mov ecx, dword [0x42d58c]
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
mov esi, dword [ebp - 0x18]
add eax, edx
xor edx, edx
mov word [ecx + eax*2], dx
mov esi, dword [esi + 0x3c]
mov eax, edi
neg eax
mov dword [ebp - 0xc], esi
sbb eax, eax
and eax, 5
add eax, 0x22
neg edi
movzx ebx, ax
sbb edi, edi
mov dword [ebp - 0x5c], ebx
and edi, 0x39
add edi, 0x27
movzx edi, di
mov dword [ebp - 0x60], edi
test esi, esi
je 0x407a11
movzx eax, word [esi]
mov edx, eax
cmp ax, di
je 0x407467
cmp ax, bx
jne 0x407a11
mov dword [ebp - 0x4c], 0
test dx, dx
je 0x4076fb
jmp 0x407480
cmp byte [0x42d590], 0
jne 0x4076fb
call fcn.00407ede
cmp dword [0x42d544], 0
jne 0x41ec96
mov eax, dword [ebp - 0x40]
mov edx, esi
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x54], eax
lea ecx, [edx + 2]
jmp 0x4074c0
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4074c0
movzx eax, word [esi]
sub edx, ecx
sar edx, 1
mov dword [ebp - 0x34], edx
cmp ax, di
je 0x40787b
cmp ax, bx
jne 0x407a2f
cmp edx, 1
jle 0x407a2f
cmp word [esi + edx*2 - 2], bx
jne 0x407a2f
mov eax, 0xa
mov word [esi + edx*2 - 2], ax
add esi, 2
sub edx, 2
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x34], edx
mov dword [ebp - 4], esi
lea eax, [edx + 1]
lea eax, [esi + eax*2]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 4], eax
jae 0x4076d1
jmp 0x407530
cmp byte [0x42d590], 0
jne 0x4076d1
cmp dword [0x42d544], 0
jne 0x41ecc2
mov esi, dword [ebp - 4]
push 0xa
push esi
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
mov dword [ebp - 4], eax
test eax, eax
je 0x4076d1
cmp eax, esi
jbe 0x407578
cmp word [eax - 2], 0xd
jne 0x407578
xor ecx, ecx
mov word [eax - 2], cx
mov eax, dword [ebp - 4]
xor ecx, ecx
mov word [eax], cx
add dword [ebp - 4], 2
mov eax, dword [ebp - 0x54]
test eax, eax
jne 0x407b15
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 8]
lea ecx, [eax*4]
mov dword [ebp - 0x38], ecx
cmp edx, 1
jg 0x4077bd
mov dword [ebp - 0x38], ecx
movzx eax, word [esi]
xor edx, edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x14], edx
test ax, ax
je 0x4076c5
mov ecx, eax
mov eax, 1
mov dword [ebp - 0x30], eax
mov ebx, dword [ebp - 0x24]
test cx, cx
je 0x4075ea
movzx ecx, cx
push ecx
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x407825
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
test edx, edx
je 0x407689
mov ecx, dword [ebp - 0x48]
mov edi, esi
test ecx, ecx
jne 0x4077ed
movzx eax, word [esi]
mov ecx, eax
test ax, ax
je 0x407677
lea esp, [esp]
push ecx
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x40762d
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x407610
mov edx, dword [ebp - 0x2c]
cmp edi, esi
je 0x407662
cmp edx, 0x20
jge 0x407662
mov ecx, edx
mov eax, 1
shl eax, cl
inc edx
mov dword [ebp - 0x2c], edx
and eax, dword [ebp - 0x28]
je 0x407662
mov ecx, dword [ebp - 0x38]
mov eax, dword [0x42d588]
inc dword [ebp - 0x14]
mov dword [ecx + eax], edi
add ecx, 4
inc dword [ebp - 0x30]
mov dword [ebp - 0x38], ecx
movzx eax, word [esi]
mov ecx, eax
test ax, ax
je 0x407677
xor eax, eax
mov word [esi], ax
add esi, 2
movzx ecx, word [esi]
movzx eax, cx
mov ecx, eax
test ax, ax
je 0x407695
mov eax, dword [ebp - 0x30]
jmp 0x4075c6
mov ecx, dword [ebp - 0x44]
cmp word [esi], cx
jne 0x4075f2
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x4076c5
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x50]
mov ecx, dword [eax + 0x40]
call fcn.00407ba2
mov ebx, dword [ebp - 0x4c]
mov dword [ebp - 0x58], eax
test ebx, ebx
je 0x40772e
mov ecx, ebx
call fcn.00412a06
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 4], eax
jb 0x407530
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x40783c
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x34]
mov ecx, dword [0x42d58c]
lea esi, [esi + eax*2]
add esi, 2
mov dword [ebp - 0xc], esi
cmp word [esi], 0
jne 0x41eccc
cmp dword [ebp - 8], 1
jle 0x407722
test ecx, ecx
je 0x407722
cmp word [ecx], 0
je 0x407722
mov edx, dword [ebp - 0x10]
xor eax, eax
mov word [ecx + edx*2 + 2], ax
mov eax, dword [0x42d588]
mov dword [eax + edx*4 + 4], 0
mov eax, dword [ebp - 0x58]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [0x443cd8]
jmp 0x4076bb
mov ebx, dword [ebp - 4]
add ebx, 0xe
mov ecx, ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
test ax, ax
je 0x40777b
mov esi, ebx
mov edx, eax
mov ebx, dword [ebp - 0x1c]
cmp dx, bx
je 0x407778
cmp dx, 0x20
je 0x407772
lea ecx, [esi + 2]
mov dword [ebp - 4], ecx
mov esi, ecx
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x407753
jmp 0x407778
cmp word [ecx + 2], bx
je 0x40775e
mov ebx, dword [ebp - 0x54]
movzx esi, word [ecx]
xor eax, eax
mov word [ecx], ax
mov ecx, dword [ebp - 0x24]
call fcn.00410040
mov ecx, ebx
call fcn.0041297b
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
mov word [eax], si
mov ecx, dword [ebp - 4]
cmp word [ecx], 0
je 0x4077ad
add ecx, 2
mov dword [ebp - 4], ecx
mov esi, dword [ebp - 0x1c]
test ecx, ecx
jne 0x407212
jmp 0x40737a
mov edi, dword [0x42d588]
add edi, 4
add edi, ecx
lea ecx, [edx - 1]
xor eax, eax
rep stosd dword es:[edi], eax
jmp 0x4075a8
add ecx, 2
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x407220
jmp 0x40722a
cmp eax, ecx
jne 0x4075ff
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
mov eax, dword [0x42d588]
add ecx, edi
inc edi
mov dword [eax + ecx*4], esi
jmp 0x407698
add ecx, 2
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
mov esi, dword [ebp - 0x1c]
test ax, ax
jne 0x4072f0
jmp 0x407369
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x4075d1
jmp 0x4075e4
mov ecx, eax
call fcn.00410040
jmp 0x4076dc
push 0
lea eax, [ebp - 4]
push eax
lea eax, [ecx + 2]
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
mov edx, eax
add esp, 0xc
test edx, edx
jle 0x41ec59
mov ecx, dword [ebp - 4]
jmp 0x407328
mov esi, dword [ebp - 0x18]
mov ecx, dword [0x42d58c]
jmp 0x407424
cmp edx, 1
jle 0x4074de
cmp word [esi + edx*2 - 2], di
jne 0x4074de
add esi, 2
sub edx, 2
xor eax, eax
mov dword [ebp - 0xc], esi
push 0x402510
push esi
mov dword [ebp - 0x34], edx
mov word [esi + edx*2], ax
call dword [sym.imp.msvcrt.dll__wpopen]
add esp, 8
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x41ed10
push eax
xor ebx, ebx
xor edi, edi
xor esi, esi
call dword [sym.imp.msvcrt.dll_feof]
add esp, 4
test eax, eax
jne 0x40795d
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll_ferror]
add esp, 4
test eax, eax
jne 0x40795d
mov eax, ebx
sub eax, edi
cmp eax, 0x200
jae 0x407917
add ebx, 0x100
test esi, esi
je 0x407a05
mov edx, ebx
mov ecx, esi
call fcn.00410100
test eax, eax
je 0x41ecd7
mov esi, eax
test esi, esi
je 0x41ecde
push dword [ebp - 0x1c]
mov eax, ebx
mov byte [esi + edi], 0
sub eax, edi
lea ecx, [esi + edi]
push eax
push ecx
call dword [sym.imp.msvcrt.dll_fgets]
add esp, 0xc
test eax, eax
je 0x40795d
mov edi, esi
lea ecx, [edi + 1]
lea esp, [esp]
mov al, byte [edi]
inc edi
test al, al
jne 0x407940
push dword [ebp - 0x1c]
sub edi, ecx
call dword [sym.imp.msvcrt.dll_feof]
add esp, 4
test eax, eax
je 0x4078d3
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll__pclose]
add esp, 4
lea edx, [edi*2 + 4]
mov ecx, esi
call fcn.00410100
mov ebx, eax
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x41eca0
cmp dword [0x42d58c], 0
je 0x41ecf4
cmp dword [0x42d588], 0
je 0x41ecf4
test ebx, ebx
je 0x41ecf4
push edi
lea eax, [ebx + edi]
push ebx
push eax
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
mov dword [ebp - 0x20], edi
mov ecx, dword [0x433854]
call fcn.00410638
test eax, eax
je 0x41ecbb
mov edx, 1
push edi
push ebx
push edi
lea eax, [edi + ebx]
push eax
push edx
push ecx
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
mov dword [ebp - 4], ebx
lea eax, [ebx + eax*2]
mov dword [ebp - 0x3c], eax
cmp eax, ebx
je 0x407b02
cmp word [eax - 2], 0xa
jne 0x407b02
xor ecx, ecx
mov word [eax], cx
jmp 0x40751d
mov ecx, ebx
call fcn.004100b0
jmp 0x40790d
push 0
xor edx, edx
mov ecx, esi
call fcn.0040ea40
mov ecx, dword [0x42d58c]
mov esi, eax
mov dword [ebp - 0xc], esi
movzx edx, word [esi]
jmp 0x407467
cmp eax, 0x22
je 0x407b52
push 0
push 0
push 3
push 0
push 5
push 0x80000000
push esi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x41ed3c
push 2
push 0
push 0
push ebx
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
push 0
push 0
push 0
push ebx
mov edi, eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
lea ecx, [edi*2 + 4]
call fcn.004100b0
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x41ed2b
push 0
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], 0xffffffff
push ecx
push edi
add eax, edi
push eax
push ebx
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
push ebx
mov esi, eax
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test esi, esi
je 0x41ecb1
mov eax, dword [ebp - 0x20]
cmp eax, edi
jne 0x4076d1
mov ebx, dword [ebp - 0x1c]
jmp 0x4079b8
mov ecx, dword [ebp - 4]
movzx eax, word [ecx + 8]
add ecx, 0xa
mov dword [ebp - 0x44], eax
mov dword [ebp - 4], ecx
jmp 0x4077ad
add ecx, 2
inc ebx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x48], ebx
jmp 0x407369
mov ecx, dword [ebp - 4]
mov edi, 1
add ecx, 0x10
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], ecx
jmp 0x4077ad
mov ecx, 0xa
mov word [eax], cx
add eax, 2
mov dword [ebp - 0x3c], eax
jmp 0x4079fb
dec eax
mov dword [ebp - 0x54], eax
jmp 0x4076c5
mov eax, dword [ebp - 4]
lea ecx, [ebp - 4]
push 0
add eax, 0xa
push ecx
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
mov dword [ebp - 0x40], eax
test eax, eax
jle 0x41ec59
mov ecx, dword [ebp - 4]
jmp 0x4077ad
mov ebx, dword [ebp - 8]
jmp 0x4077ad
add esi, 2
dec edx
mov dword [ebp - 0xc], esi
mov eax, esi
mov dword [ebp - 0x34], edx
mov ecx, esi
cmp word [esi], 0
je 0x407b71
mov ecx, eax
add eax, 2
cmp word [eax], 0
jne 0x407b66
mov dword [ebp - 4], ecx
cmp word [ecx], 0x22
jne 0x407a38
mov edi, edi
xor eax, eax
mov word [ecx], ax
mov ecx, dword [ebp - 4]
sub ecx, 2
mov dword [ebp - 4], ecx
cmp ecx, esi
jb 0x407a38
cmp word [ecx], 0x20
jne 0x407a38
jmp 0x407b80
cmp eax, 0x27
je 0x4071fd
xor esi, esi
jmp 0x407205
mov ecx, dword [ebp - 4]
mov edi, 1
add ecx, 0xe
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], ecx
jmp 0x4077ad
push dword [ebp - 4]
push 1
push 0x234a
call fcn.0040c5a2
add esp, 0xc
mov eax, 1
jmp 0x407725
push 0
push 0x2374
call fcn.0040c5a2
add esp, 8
call fcn.00429287
push 1
push 0x43b8b8
call dword [sym.imp.msvcrt.dll_longjmp]
call fcn.0042921a
jmp 0x40749f
mov ecx, esi
call fcn.00410040
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
jmp 0x407984
xor eax, eax
mov dword [ebp - 0x20], eax
jmp 0x407ab8
xor edx, edx
jmp 0x4079d0
call fcn.0042921a
jmp 0x40754a
mov ebx, dword [ebp - 0x5c]
mov edi, dword [ebp - 0x60]
jmp 0x407480
mov ecx, esi
call fcn.00410040
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll__pclose]
add esp, 4
mov eax, 8
jmp 0x407725
push dword [ebp - 0xc]
push 1
push 0x2374
call fcn.0040c5a2
add esp, 0xc
mov eax, 8
jmp 0x407725
push esi
push 1
push 0x2331
call fcn.0040c5a2
add esp, 0xc
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
jmp 0x407725
push ebx
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov eax, 8
jmp 0x407725
push esi
push 1
push 0x2363
call fcn.0040c5a2
add esp, 0xc
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
jmp 0x407725