Function at 0x410bf0
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 - 0x14], edx
push edi
mov ecx, 0x402478
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x44], 0x3b
call fcn.0041054b
mov ecx, dword [esi + 0x4c]
mov ebx, 1
mov dword [ebp - 0x24], eax
xor edi, edi
xor eax, eax
mov dword [ebp - 0x40], 0
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x10], edi
test ecx, ecx
je 0x410de4
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
cmp eax, 0x22
jne 0x41ebe5
add ecx, 2
mov esi, eax
mov dword [ebp - 4], ecx
mov eax, ecx
mov dword [ebp - 0x1c], esi
test eax, eax
je 0x410de1
movzx edx, word [ecx]
test dx, dx
je 0x410d4a
lea esp, [esp]
cmp dx, 0x20
jbe 0x411202
cmp word [ecx], si
je 0x410d4a
push 8
push 0x402438
push ecx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x41151f
push 7
push 0x402458
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x41ebf5
push 4
push 0x40244c
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x411502
push 7
push 0x402468
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x411131
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 0x4110ef
mov esi, ebx
mov edx, eax
mov ebx, dword [ebp - 0x1c]
mov edi, edi
cmp dx, bx
je 0x4110ec
cmp dx, 0x20
je 0x4110e2
lea ecx, [esi + 2]
mov dword [ebp - 4], ecx
mov esi, ecx
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x410d20
jmp 0x4110ec
cmp ebx, 1
jle 0x410de1
mov esi, dword [ebp - 0x14]
mov ecx, dword [0x436740]
add esi, ebx
lea edx, [esi*2 + 2]
call fcn.0040dd20
mov ecx, dword [0x43673c]
lea edx, [esi*4 + 4]
mov dword [0x436740], eax
call fcn.0040dd20
mov edx, eax
mov eax, dword [0x436740]
mov dword [0x43673c], edx
test eax, eax
je 0x41ec27
test edx, edx
je 0x41ec27
mov esi, dword [ebp - 0x14]
mov ecx, 1
mov edi, dword [ebp - 0x18]
lea edx, [edx + esi*4]
add edx, 4
inc esi
lea esi, [eax + esi*2]
mov ax, word [edi + 0x44]
lea esi, [esi + 2]
add ax, cx
lea edx, [edx + 4]
mov word [esi - 2], ax
inc ecx
mov dword [edx - 4], 0
cmp ecx, ebx
jl 0x410db3
add ecx, dword [ebp - 0x14]
xor edx, edx
mov eax, dword [0x436740]
mov edi, dword [ebp - 0x10]
mov word [eax + ecx*2], dx
mov esi, dword [ebp - 0x18]
mov esi, dword [esi + 0x3c]
mov eax, edi
neg eax
mov dword [ebp - 8], 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 0x411415
movzx eax, word [esi]
mov edx, eax
cmp ax, di
je 0x410e27
cmp ax, bx
jne 0x411415
mov dword [ebp - 0x4c], 0
test dx, dx
je 0x4110ae
jmp 0x410e40
cmp byte [0x436744], 0
jne 0x4110ae
cmp dword [0x436738], 0
jne 0x41ec48
cmp dword [0x43259c], 0
jne 0x41ec6b
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]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x410e80
movzx eax, word [esi]
sub edx, ecx
sar edx, 1
mov dword [ebp - 0x34], edx
cmp ax, di
je 0x4112bf
cmp ax, bx
jne 0x41142d
cmp edx, 1
jle 0x41142d
cmp word [esi + edx*2 - 2], bx
jne 0x41142d
mov eax, 0xa
mov word [esi + edx*2 - 2], ax
add esi, 2
sub edx, 2
mov dword [ebp - 8], 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 0x41108a
jmp 0x410ef0
cmp byte [0x436744], 0
jne 0x41108a
cmp dword [0x43259c], 0
jne 0x41ec97
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 0x41108a
cmp eax, esi
jbe 0x410f38
cmp word [eax - 2], 0xd
jne 0x410f38
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 0x41155a
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0xc]
lea ecx, [eax*4]
mov dword [ebp - 0x38], ecx
cmp edx, 1
jg 0x41121b
mov dword [ebp - 0x38], ecx
movzx eax, word [esi]
xor edx, edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x10], edx
test ax, ax
je 0x41107e
mov ecx, 1
mov dword [ebp - 0x30], ecx
mov ebx, dword [ebp - 0x24]
test ax, ax
je 0x410fa9
movzx ecx, ax
nop
push ecx
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x411277
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
test edx, edx
je 0x41103f
mov eax, dword [ebp - 0x48]
mov edi, esi
test eax, eax
jne 0x41123e
movzx eax, word [esi]
test ax, ax
je 0x41101a
mov ecx, eax
push ecx
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x410fe5
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x410fc8
mov edx, dword [ebp - 0x2c]
cmp edi, esi
je 0x41101a
cmp edx, 0x20
jge 0x41101a
mov ecx, edx
mov eax, 1
shl eax, cl
inc edx
mov dword [ebp - 0x2c], edx
and eax, dword [ebp - 0x28]
je 0x41101a
mov ecx, dword [ebp - 0x38]
mov eax, dword [0x43673c]
inc dword [ebp - 0x10]
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 0x41102f
xor eax, eax
mov word [esi], ax
add esi, 2
movzx ecx, word [esi]
movzx eax, cx
test cx, cx
je 0x41104b
mov ecx, dword [ebp - 0x30]
jmp 0x410f84
mov eax, dword [ebp - 0x44]
cmp word [esi], ax
jne 0x410fb1
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x41107e
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x50]
mov ecx, dword [eax + 0x40]
call fcn.00410bbb
mov ebx, dword [ebp - 0x4c]
mov dword [ebp - 0x58], eax
test ebx, ebx
jne 0x411232
mov ebx, dword [0x436778]
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 4], eax
jb 0x410ef0
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x41128e
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x34]
lea esi, [esi + eax*2]
add esi, 2
mov dword [ebp - 8], esi
cmp word [esi], 0
jne 0x41eca1
cmp dword [ebp - 0xc], 1
jle 0x4110d6
mov eax, dword [0x436740]
test eax, eax
je 0x4110d6
cmp word [eax], 0
je 0x4110d6
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov word [eax + ecx*2 + 2], dx
mov eax, dword [0x43673c]
mov dword [eax + ecx*4 + 4], edx
mov eax, dword [ebp - 0x58]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp word [ecx + 2], bx
je 0x410d33
mov ebx, dword [ebp - 0x54]
movzx esi, word [ecx]
xor eax, eax
mov word [ecx], ax
mov ecx, dword [ebp - 0x24]
call fcn.0040dc60
mov ecx, ebx
call fcn.0041054b
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
mov word [eax], si
mov ecx, dword [ebp - 4]
cmp word [ecx], 0
je 0x411121
add ecx, 2
mov dword [ebp - 4], ecx
mov esi, dword [ebp - 0x1c]
test ecx, ecx
jne 0x410c70
jmp 0x410d4a
push 5
push 0x40258c
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x411563
push 7
push 0x402598
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x41ec0b
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 0x4111f1
lea ecx, [ecx]
cmp ax, si
je 0x4111f1
cmp ax, 0x2a
je 0x41154b
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 0x41ec0b
mov ecx, dword [ebp - 4]
cmp word [ecx], 0x2d
je 0x41129a
mov edx, esi
cmp edx, 0x20
jge 0x4111e4
cmp esi, edx
jg 0x4111e4
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 0x4111d0
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0x28], ebx
mov ebx, dword [ebp - 0x54]
movzx eax, word [ecx]
cmp eax, 0x2c
je 0x41125d
cmp eax, 0x2a
je 0x411263
cmp ebx, dword [ebp - 0xc]
jle 0x411517
mov dword [ebp - 0xc], ebx
jmp 0x411121
add ecx, 2
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x410c80
jmp 0x410c8a
mov edi, dword [0x43673c]
add edi, 4
add edi, ecx
lea ecx, [edx - 1]
xor eax, eax
rep stosd dword es:[edi], eax
jmp 0x410f68
mov ecx, ebx
call fcn.0041198f
jmp 0x411074
cmp ecx, eax
jne 0x410fbe
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 0x14]
mov eax, dword [0x43673c]
mov dword [eax + ecx*4], esi
mov ecx, dword [ebp - 0x10]
inc ecx
jmp 0x41104e
add ecx, 2
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
mov esi, dword [ebp - 0x1c]
test ax, ax
jne 0x411180
jmp 0x4111f1
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x410f90
jmp 0x410fa3
mov ecx, eax
call fcn.0040dc60
jmp 0x411095
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 0x41ec0b
mov ecx, dword [ebp - 4]
jmp 0x4111b8
cmp edx, 1
jle 0x410e9e
cmp word [esi + edx*2 - 2], di
jne 0x410e9e
add esi, 2
sub edx, 2
xor eax, eax
mov dword [ebp - 8], esi
push 0x40263c
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 0x41ece5
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 0x41136e
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll_ferror]
add esp, 4
test eax, eax
jne 0x41136e
mov eax, ebx
sub eax, edi
cmp eax, 0x200
jae 0x41134d
add ebx, 0x100
test esi, esi
jne 0x411535
mov ecx, ebx
call fcn.0040dcd0
mov esi, eax
test esi, esi
je 0x41ecb3
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
jne 0x4114d9
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll__pclose]
add esp, 4
lea edx, [edi*2 + 4]
mov ecx, esi
call fcn.0040dd20
mov ebx, eax
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x41ec75
cmp dword [0x436740], 0
je 0x41ecc9
cmp dword [0x43673c], 0
je 0x41ecc9
test ebx, ebx
je 0x41ecc9
push edi
lea eax, [ebx + edi]
push ebx
push eax
call sub.msvcrt.dll_memmove
add esp, 0xc
mov dword [ebp - 0x20], edi
mov ecx, dword [0x4325a0]
call fcn.0040e248
test eax, eax
je 0x41ec90
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 0x4114c6
cmp word [eax - 2], 0xa
jne 0x4114c6
xor ecx, ecx
mov word [eax], cx
jmp 0x410edd
push 0
xor edx, edx
mov ecx, esi
call fcn.0040bc30
mov esi, eax
mov dword [ebp - 8], esi
movzx edx, word [esi]
jmp 0x410e27
cmp eax, 0x22
je 0x41158f
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 0x41ed11
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.0040dcd0
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x41ed00
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 0x41ec86
mov eax, dword [ebp - 0x20]
cmp eax, edi
jne 0x41108a
mov ebx, dword [ebp - 0x1c]
jmp 0x4113c8
mov ecx, 0xa
mov word [eax], cx
add eax, 2
mov dword [ebp - 0x3c], eax
jmp 0x41140b
mov edi, esi
lea ecx, [edi + 1]
mov edi, edi
mov al, byte [edi]
inc edi
test al, al
jne 0x4114e0
push dword [ebp - 0x1c]
sub edi, ecx
call dword [sym.imp.msvcrt.dll_feof]
add esp, 4
test eax, eax
je 0x411313
jmp 0x41136e
mov ecx, dword [ebp - 4]
movzx eax, word [ecx + 8]
add ecx, 0xa
mov dword [ebp - 0x44], eax
mov dword [ebp - 4], ecx
jmp 0x411121
mov ebx, dword [ebp - 0xc]
jmp 0x411121
mov ecx, dword [ebp - 4]
mov edi, 1
add ecx, 0x10
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], ecx
jmp 0x411121
mov edx, ebx
mov ecx, esi
call fcn.0040dd20
test eax, eax
jne 0x411343
jmp 0x41ecac
add ecx, 2
inc ebx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x48], ebx
jmp 0x4111f1
dec eax
mov dword [ebp - 0x54], eax
jmp 0x41107e
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 0x41ec0b
mov ecx, dword [ebp - 4]
jmp 0x411121
add esi, 2
dec edx
mov dword [ebp - 8], esi
mov eax, esi
mov dword [ebp - 0x34], edx
mov ecx, esi
cmp word [esi], 0
je 0x4115ae
mov ecx, eax
add eax, 2
cmp word [eax], 0
jne 0x4115a3
mov dword [ebp - 4], ecx
cmp word [ecx], 0x22
jne 0x411436
jmp 0x4115c0
xor eax, eax
mov word [ecx], ax
mov ecx, dword [ebp - 4]
sub ecx, 2
mov dword [ebp - 4], ecx
cmp ecx, esi
jb 0x411436
cmp word [ecx], 0x20
jne 0x411436
jmp 0x4115c0
cmp eax, 0x27
je 0x410c5b
xor esi, esi
jmp 0x410c63
mov ecx, dword [ebp - 4]
mov edi, 1
add ecx, 0xe
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], ecx
jmp 0x411121
push dword [ebp - 4]
push 1
push 0x234a
call fcn.004078e4
add esp, 0xc
mov eax, 1
jmp 0x4110d9
push 0
push 0x2374
call fcn.004078e4
add esp, 8
call fcn.00429922
push 1
push 0x440a30
call dword [sym.imp.msvcrt.dll_longjmp]
mov eax, dword [0x4490e4]
mov dword [0x436740], eax
mov eax, dword [0x4490e0]
mov dword [0x436738], 0
mov dword [0x43673c], eax
jmp 0x410e5a
call fcn.004298b5
jmp 0x410e67
mov ecx, esi
call fcn.0040dc60
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
jmp 0x411395
xor eax, eax
mov dword [ebp - 0x20], eax
jmp 0x4114b6
xor edx, edx
jmp 0x4113e0
call fcn.004298b5
jmp 0x410f0a
mov ebx, dword [ebp - 0x5c]
mov edi, dword [ebp - 0x60]
jmp 0x410e40
mov ecx, esi
call fcn.0040dc60
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll__pclose]
add esp, 4
mov eax, 8
jmp 0x4110d9
push dword [ebp - 8]
push 1
push 0x2374
call fcn.004078e4
add esp, 0xc
mov eax, 8
jmp 0x4110d9
push esi
push 1
push 0x2331
call fcn.004078e4
add esp, 0xc
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
jmp 0x4110d9
push ebx
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov eax, 8
jmp 0x4110d9
push esi
push 1
push 0x2363
call fcn.004078e4
add esp, 0xc
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
jmp 0x4110d9