Function at 0x408cd0
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, 0x40235c
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x40], 0x3b
call fcn.00411b4b
mov ecx, dword [esi + 0x4c]
mov ebx, 1
xor edi, edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x3c], 0
mov dword [ebp - 8], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x18], edi
test ecx, ecx
je 0x4093a4
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
cmp eax, 0x22
jne 0x41fd66
add ecx, 2
mov esi, eax
mov dword [ebp - 4], ecx
mov dword [ebp - 0x34], esi
test ecx, ecx
je 0x4093a1
movzx eax, word [ecx]
test ax, ax
je 0x408eba
lea esp, [esp]
cmp ax, 0x20
jbe 0x4092eb
cmp word [ecx], si
je 0x408eba
push 8
push 0x4025c8
push ecx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4095db
push 7
push 0x4025e8
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x41fd76
push 4
push 0x4025dc
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4095b7
push 7
push 0x4025f8
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x409258
push 5
push 0x402608
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x40960d
push 7
push 0x402614
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x41fd8c
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 0x408ea9
lea ecx, [ecx]
cmp ax, si
je 0x408ea9
cmp ax, 0x2a
je 0x4095cc
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 0x41fd8c
mov ecx, dword [ebp - 4]
cmp word [ecx], 0x2d
je 0x40937c
mov edx, esi
cmp edx, 0x20
jge 0x408e94
cmp esi, edx
jg 0x408e94
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 0x408e80
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x28], ebx
mov ebx, dword [ebp - 0x54]
movzx eax, word [ecx]
cmp eax, 0x2c
je 0x409320
cmp eax, 0x2a
je 0x409326
cmp ebx, dword [ebp - 8]
jle 0x409639
mov dword [ebp - 8], ebx
jmp 0x4092c3
cmp ebx, 1
jle 0x4093a1
mov esi, dword [ebp - 0x10]
mov ecx, dword [0x42d594]
add esi, ebx
lea edx, [esi*2 + 2]
call fcn.00412650
mov ecx, dword [0x42d590]
lea edx, [esi*4 + 4]
mov dword [0x42d594], eax
call fcn.00412650
mov ecx, dword [0x42d594]
mov dword [0x42d590], eax
test ecx, ecx
je 0x41fda8
test eax, eax
je 0x41fda8
mov edx, 1
cmp ebx, edx
jle 0x408f56
mov ebx, dword [ebp - 0x10]
add ecx, 2
mov edi, dword [ebp - 0x1c]
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 0x408f30
mov ecx, dword [0x42d594]
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
mov esi, dword [ebp - 0x1c]
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 0x409355
movzx eax, word [esi]
cmp ax, bx
jne 0x40934c
cmp word [esi], 0
mov dword [ebp - 0x4c], 0
je 0x409209
cmp byte [0x42d598], 0
jne 0x409209
call fcn.004099ba
cmp dword [0x42d54c], 0
jne 0x41fdc9
mov eax, dword [ebp - 0x3c]
mov edx, esi
mov dword [ebp - 4], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x54], eax
lea ecx, [edx + 2]
lea esp, [esp]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x408ff0
movzx eax, word [esi]
sub edx, ecx
sar edx, 1
mov dword [ebp - 0x34], edx
cmp ax, di
je 0x4093af
cmp ax, bx
jne 0x40951e
cmp edx, 1
jle 0x40951e
cmp word [esi + edx*2 - 2], bx
jne 0x40951e
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 - 0x38], eax
cmp dword [ebp - 4], eax
jae 0x4091df
jmp 0x409060
cmp byte [0x42d598], 0
jne 0x4091df
cmp dword [0x42d54c], 0
jne 0x41fde4
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 0x4091df
cmp eax, esi
jbe 0x4090a8
cmp word [eax - 2], 0xd
jne 0x4090a8
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 0x409604
mov ecx, dword [ebp - 8]
cmp ecx, 1
jg 0x4092d3
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x18], ecx
cmp word [esi], cx
je 0x4091d3
mov edx, dword [ebp - 0x10]
mov eax, 1
shl edx, 2
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x48], edx
lea ebx, [ebx]
cmp word [esi], 0
mov ebx, dword [ebp - 0x24]
je 0x40911c
lea esp, [esp]
movzx eax, word [esi]
push eax
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x40933a
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x14]
test ecx, ecx
je 0x40923c
mov edx, dword [ebp - 0x44]
mov edi, esi
test edx, edx
jne 0x409302
cmp word [esi], 0
je 0x40919f
movzx eax, word [esi]
push eax
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x409151
add esi, 2
cmp word [esi], ax
jne 0x409137
mov ecx, dword [ebp - 0x2c]
cmp edi, esi
je 0x409184
cmp ecx, 0x20
jge 0x409184
mov eax, 1
shl eax, cl
inc ecx
mov dword [ebp - 0x2c], ecx
and eax, dword [ebp - 0x28]
je 0x409184
mov edx, dword [ebp - 0x48]
mov eax, dword [0x42d590]
inc dword [ebp - 0x18]
mov dword [edx + eax], edi
add edx, 4
inc dword [ebp - 0x14]
mov dword [ebp - 0x48], edx
cmp word [esi], 0
je 0x409192
xor eax, eax
mov word [esi], ax
add esi, 2
cmp word [esi], 0
mov eax, dword [ebp - 0x14]
jne 0x4090f0
mov edx, dword [ebp - 0x18]
test edx, edx
je 0x4091d3
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x50]
mov ecx, dword [eax + 0x40]
call fcn.00409692
mov ebx, dword [ebp - 0x4c]
mov dword [ebp - 0x58], eax
test ebx, ebx
je 0x40924d
mov ecx, ebx
call fcn.00411bd6
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x38]
cmp dword [ebp - 4], eax
jb 0x409060
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x409370
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x34]
mov ecx, dword [0x42d594]
lea esi, [esi + eax*2]
add esi, 2
mov dword [ebp - 0xc], esi
cmp word [esi], 0
jne 0x41fdee
cmp dword [ebp - 8], 1
jle 0x409230
test ecx, ecx
je 0x409230
cmp word [ecx], 0
je 0x409230
mov edx, dword [ebp - 0x10]
xor eax, eax
mov word [ecx + edx*2 + 2], ax
mov eax, dword [0x42d590]
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 edx, dword [ebp - 0x40]
cmp word [esi], dx
jne 0x409124
jmp 0x40919f
mov ebx, dword [0x443ce8]
jmp 0x4091c9
mov eax, dword [ebp - 4]
add eax, 0xe
mov dword [ebp - 4], eax
mov ebx, eax
movzx ecx, word [eax]
test cx, cx
je 0x409291
jmp 0x409270
cmp cx, si
je 0x409291
cmp cx, 0x20
je 0x40928b
add eax, 2
mov dword [ebp - 4], eax
movzx ecx, word [eax]
test cx, cx
jne 0x409270
jmp 0x409291
cmp word [eax + 2], si
je 0x40927b
movzx esi, word [eax]
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 0x24]
call fcn.0040f480
mov ecx, ebx
call fcn.00411b4b
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 0x4092c3
add ecx, 2
mov dword [ebp - 4], ecx
mov esi, dword [ebp - 0x34]
test ecx, ecx
jne 0x408d50
jmp 0x408eba
mov eax, dword [0x42d590]
dec ecx
mov edi, dword [ebp - 0x10]
add eax, 4
lea edi, [eax + edi*4]
xor eax, eax
rep stosd dword es:[edi], eax
jmp 0x4090c8
add ecx, 2
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
test ax, ax
jne 0x408d60
jmp 0x408d6a
cmp eax, edx
jne 0x409131
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
mov eax, dword [0x42d590]
add ecx, edx
inc edx
mov dword [eax + ecx*4], esi
jmp 0x4091a2
add ecx, 2
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
mov esi, dword [ebp - 0x34]
test ax, ax
jne 0x408e30
jmp 0x408ea9
add esi, 2
cmp word [esi], 0
jne 0x409100
jmp 0x409116
cmp ax, di
je 0x408fa0
push 0
xor edx, edx
mov ecx, esi
call fcn.0040de50
mov ecx, dword [0x42d594]
mov esi, eax
mov dword [ebp - 0xc], eax
jmp 0x408fa0
mov ecx, eax
call fcn.0040f480
jmp 0x4091ea
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 0x41fd8c
mov ecx, dword [ebp - 4]
jmp 0x408e68
mov esi, dword [ebp - 0x1c]
mov ecx, dword [0x42d594]
jmp 0x408f64
cmp edx, 1
jle 0x40900e
cmp word [esi + edx*2 - 2], di
jne 0x40900e
add esi, 2
sub edx, 2
xor eax, eax
mov dword [ebp - 0xc], esi
push 0x4026ac
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 - 0x18], eax
test eax, eax
je 0x41fe2b
push eax
xor esi, esi
xor edi, edi
xor ebx, ebx
call dword [sym.imp.msvcrt.dll_feof]
add esp, 4
test eax, eax
jne 0x40947a
push dword [ebp - 0x18]
call dword [sym.imp.msvcrt.dll_ferror]
add esp, 4
test eax, eax
jne 0x40947a
mov eax, esi
sub eax, edi
cmp eax, 0x200
jae 0x40943f
add esi, 0x100
test ebx, ebx
je 0x409512
mov edx, esi
mov ecx, ebx
call fcn.00412650
mov ebx, eax
test ebx, ebx
je 0x41fdf9
push dword [ebp - 0x18]
mov eax, esi
mov byte [ebx + edi], 0
sub eax, edi
lea ecx, [ebx + edi]
push eax
push ecx
call dword [sym.imp.msvcrt.dll_fgets]
add esp, 0xc
test eax, eax
je 0x40947a
mov edi, ebx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x409461
push dword [ebp - 0x18]
sub edi, ecx
call dword [sym.imp.msvcrt.dll_feof]
add esp, 4
test eax, eax
je 0x409403
push dword [ebp - 0x18]
call dword [sym.imp.msvcrt.dll__pclose]
add esp, 4
lea edx, [edi*2 + 4]
mov ecx, ebx
call fcn.00412650
cmp dword [0x42d594], 0
mov ebx, eax
mov dword [ebp - 0x30], ebx
je 0x41fe0f
cmp dword [0x42d590], 0
je 0x41fe0f
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 [0x433864]
call fcn.0040f9a9
test eax, eax
je 0x41fddd
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 - 0x38], eax
cmp eax, ebx
je 0x4095f1
cmp word [eax - 2], 0xa
jne 0x4095f1
xor ecx, ecx
mov word [eax], cx
jmp 0x40904d
mov ecx, esi
call fcn.0040f4e0
jmp 0x409435
cmp eax, 0x22
je 0x409641
push 0
push 0
push 3
push 0
push 5
push 0x80000000
push esi
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x41fe57
push 2
push 0
push 0
push ebx
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
push 0
push 0
push 0
push ebx
mov edi, eax
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
lea ecx, [edi*2 + 4]
call fcn.0040f4e0
mov dword [ebp - 0x30], eax
test eax, eax
je 0x41fe46
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_2_1.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 0x41fdd3
mov eax, dword [ebp - 0x20]
cmp eax, edi
jne 0x4091df
mov ebx, dword [ebp - 0x30]
jmp 0x4094c5
mov ecx, dword [ebp - 4]
movzx eax, word [ecx + 8]
add ecx, 0xa
mov dword [ebp - 0x40], eax
mov dword [ebp - 4], ecx
jmp 0x4092c3
add ecx, 2
inc ebx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x44], ebx
jmp 0x408ea9
mov ecx, dword [ebp - 4]
mov edi, 1
add ecx, 0x10
mov dword [ebp - 0x18], edi
mov dword [ebp - 4], ecx
jmp 0x4092c3
mov ecx, 0xa
mov word [eax], cx
add eax, 2
mov dword [ebp - 0x38], eax
jmp 0x409508
dec eax
mov dword [ebp - 0x54], eax
jmp 0x4091d3
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 - 0x3c], eax
test eax, eax
jle 0x41fd8c
mov ecx, dword [ebp - 4]
jmp 0x4092c3
mov ebx, dword [ebp - 8]
jmp 0x4092c3
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 0x409660
mov ecx, eax
add eax, 2
cmp word [eax], 0
jne 0x409655
mov dword [ebp - 4], ecx
cmp word [ecx], 0x22
jne 0x409527
lea ecx, [ecx]
xor eax, eax
mov word [ecx], ax
mov ecx, dword [ebp - 4]
sub ecx, 2
mov dword [ebp - 4], ecx
cmp ecx, esi
jb 0x409527
cmp word [ecx], 0x20
jne 0x409527
jmp 0x409670
cmp eax, 0x27
je 0x408d3d
xor esi, esi
jmp 0x408d45
mov ecx, dword [ebp - 4]
mov edi, 1
add ecx, 0xe
mov dword [ebp - 0x18], edi
mov dword [ebp - 4], ecx
jmp 0x4092c3
push dword [ebp - 4]
push 1
push 0x234a
call fcn.00414802
add esp, 0xc
mov eax, 1
jmp 0x409233
push 0
push 0x2374
call fcn.00414802
add esp, 8
call fcn.0042904e
push 1
push 0x43b8c8
call dword [sym.imp.msvcrt.dll_longjmp]
call fcn.00428fe1
jmp 0x408fd0
xor eax, eax
mov dword [ebp - 0x20], eax
jmp 0x4095a7
xor edx, edx
jmp 0x4094dd
call fcn.00428fe1
jmp 0x40907a
mov ebx, dword [ebp - 0x5c]
mov edi, dword [ebp - 0x60]
jmp 0x408fb1
push dword [ebp - 0x18]
call dword [sym.imp.msvcrt.dll__pclose]
add esp, 4
mov eax, 8
jmp 0x409233
push dword [ebp - 0xc]
push 1
push 0x2374
call fcn.00414802
add esp, 0xc
mov eax, 8
jmp 0x409233
push esi
push 1
push 0x2331
call fcn.00414802
add esp, 0xc
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
jmp 0x409233
push ebx
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov eax, 8
jmp 0x409233
push esi
push 1
push 0x2363
call fcn.00414802
add esp, 0xc
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
jmp 0x409233