Function at 0x410b50
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, 0x402468
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x44], 0x3b
call fcn.0041049b
mov ecx, dword [esi + 0x4c]
mov edi, 1
mov dword [ebp - 0x24], eax
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x40], 0
mov dword [ebp - 8], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x10], ebx
test ecx, ecx
je 0x41120d
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
cmp eax, 0x22
jne 0x41eaab
add ecx, 2
mov esi, eax
mov dword [ebp - 4], ecx
mov eax, ecx
mov dword [ebp - 0x1c], esi
test eax, eax
je 0x41120a
movzx edx, word [ecx]
test dx, dx
je 0x410caa
lea esp, [esp]
cmp dx, 0x20
jbe 0x411172
cmp word [ecx], si
je 0x410caa
push 8
push 0x402428
push ecx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4114a1
push 7
push 0x402448
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x41eabb
push 4
push 0x40243c
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x411484
push 7
push 0x402458
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4110a6
mov edi, dword [ebp - 4]
add edi, 0xe
mov ecx, edi
mov dword [ebp - 0x54], edi
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
test ax, ax
je 0x411064
mov esi, edi
mov edx, eax
mov edi, dword [ebp - 0x1c]
mov edi, edi
cmp dx, di
je 0x411061
cmp dx, 0x20
je 0x411057
lea ecx, [esi + 2]
mov dword [ebp - 4], ecx
mov esi, ecx
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x410c80
jmp 0x411061
cmp edi, 1
jle 0x41120a
mov esi, dword [ebp - 0x14]
mov ecx, dword [0x435730]
add esi, edi
lea edx, [esi*2 + 2]
call fcn.0040dc60
mov ecx, dword [0x43572c]
lea edx, [esi*4 + 4]
mov dword [0x435730], eax
call fcn.0040dc60
mov ecx, dword [0x435730]
mov dword [0x43572c], eax
test ecx, ecx
je 0x41eaed
test eax, eax
je 0x41eaed
mov edx, 1
cmp edi, edx
jle 0x410d46
mov edi, dword [ebp - 0x14]
add ecx, 2
mov ebx, dword [ebp - 0x18]
lea esi, [edi + 1]
lea edi, [ecx + edi*2]
mov ecx, dword [ebp - 8]
lea esi, [eax + esi*4]
lea ebx, [ebx]
mov ax, word [ebx + 0x44]
lea edi, [edi + 2]
add ax, dx
lea esi, [esi + 4]
mov word [edi - 2], ax
inc edx
mov dword [esi - 4], 0
cmp edx, ecx
jl 0x410d20
mov ecx, dword [0x435730]
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
add eax, edx
xor edx, edx
mov word [ecx + eax*2], dx
mov esi, dword [esi + 0x3c]
mov eax, ebx
neg eax
mov dword [ebp - 0xc], esi
sbb eax, eax
and eax, 5
add eax, 0x22
neg ebx
movzx edi, ax
sbb ebx, ebx
mov dword [ebp - 0x5c], edi
and ebx, 0x39
add ebx, 0x27
movzx ebx, bx
mov dword [ebp - 0x60], ebx
test esi, esi
je 0x411393
movzx eax, word [esi]
mov edx, eax
cmp ax, bx
je 0x410d97
cmp ax, di
jne 0x411393
mov dword [ebp - 0x4c], 0
test dx, dx
je 0x411024
jmp 0x410db0
cmp byte [0x435734], 0
jne 0x411024
call fcn.00411fc0
cmp dword [0x43158c], 0
jne 0x41eb0e
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 0x410df0
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x410df0
movzx eax, word [esi]
sub edx, ecx
sar edx, 1
mov dword [ebp - 0x34], edx
cmp ax, bx
je 0x41123d
cmp ax, di
jne 0x4113b1
cmp edx, 1
jle 0x4113b1
cmp word [esi + edx*2 - 2], di
jne 0x4113b1
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 0x410ffa
jmp 0x410e60
cmp byte [0x435734], 0
jne 0x410ffa
cmp dword [0x43158c], 0
jne 0x41eb3a
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 0x410ffa
cmp eax, esi
jbe 0x410ea8
cmp word [eax - 2], 0xd
jne 0x410ea8
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 0x4114dc
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 8]
lea ecx, [eax*4]
mov dword [ebp - 0x38], ecx
cmp edx, 1
jg 0x41118b
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 0x410fee
mov ecx, 1
mov dword [ebp - 0x30], ecx
mov ebx, dword [ebp - 0x24]
test ax, ax
je 0x410f19
movzx ecx, ax
nop
push ecx
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x4111e7
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
test edx, edx
je 0x410faf
mov eax, dword [ebp - 0x48]
mov edi, esi
test eax, eax
jne 0x4111ae
movzx eax, word [esi]
test ax, ax
je 0x410f8a
mov ecx, eax
push ecx
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
add esp, 8
test eax, eax
jne 0x410f55
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x410f38
mov edx, dword [ebp - 0x2c]
cmp edi, esi
je 0x410f8a
cmp edx, 0x20
jge 0x410f8a
mov ecx, edx
mov eax, 1
shl eax, cl
inc edx
mov dword [ebp - 0x2c], edx
and eax, dword [ebp - 0x28]
je 0x410f8a
mov ecx, dword [ebp - 0x38]
mov eax, dword [0x43572c]
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 0x410f9f
xor eax, eax
mov word [esi], ax
add esi, 2
movzx ecx, word [esi]
movzx eax, cx
test cx, cx
je 0x410fbb
mov ecx, dword [ebp - 0x30]
jmp 0x410ef4
mov eax, dword [ebp - 0x44]
cmp word [esi], ax
jne 0x410f21
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x410fee
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x50]
mov ecx, dword [eax + 0x40]
call fcn.00410b0b
mov ebx, dword [ebp - 0x4c]
mov dword [ebp - 0x58], eax
test ebx, ebx
jne 0x4111a2
mov ebx, dword [0x435768]
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 4], eax
jb 0x410e60
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x4111fe
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x34]
mov ecx, dword [0x435730]
lea esi, [esi + eax*2]
add esi, 2
mov dword [ebp - 0xc], esi
cmp word [esi], 0
jne 0x41eb44
cmp dword [ebp - 8], 1
jle 0x41104b
test ecx, ecx
je 0x41104b
cmp word [ecx], 0
je 0x41104b
mov edx, dword [ebp - 0x14]
xor eax, eax
mov word [ecx + edx*2 + 2], ax
mov eax, dword [0x43572c]
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
cmp word [ecx + 2], di
je 0x410c93
mov edi, dword [ebp - 0x54]
movzx esi, word [ecx]
xor eax, eax
mov word [ecx], ax
mov ecx, dword [ebp - 0x24]
call fcn.0040dba0
mov ecx, edi
call fcn.0041049b
mov edi, 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 0x411096
add ecx, 2
mov dword [ebp - 4], ecx
mov esi, dword [ebp - 0x1c]
test ecx, ecx
jne 0x410bd0
jmp 0x410caa
push 5
push 0x40257c
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x4114e5
push 7
push 0x402588
push dword [ebp - 4]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x41ead1
mov ecx, dword [ebp - 4]
xor edi, edi
add ecx, 0xe
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
test ax, ax
je 0x411161
cmp ax, si
je 0x411161
cmp ax, 0x2a
je 0x4114cd
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 0x41ead1
mov ecx, dword [ebp - 4]
cmp word [ecx], 0x2d
je 0x411218
mov edx, esi
cmp edx, 0x20
jge 0x411154
cmp esi, edx
jg 0x411154
mov eax, edx
inc edi
sub eax, esi
add edi, eax
mov dword [ebp - 0x54], edi
mov edi, dword [ebp - 0x28]
lea eax, [esi - 1]
inc esi
bts edi, eax
cmp esi, edx
jle 0x411140
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x28], edi
mov edi, dword [ebp - 0x54]
movzx eax, word [ecx]
cmp eax, 0x2c
je 0x4111cd
cmp eax, 0x2a
je 0x4111d3
cmp edi, dword [ebp - 8]
jle 0x411499
mov dword [ebp - 8], edi
jmp 0x411096
add ecx, 2
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x410be0
jmp 0x410bea
mov edi, dword [0x43572c]
add edi, 4
add edi, ecx
lea ecx, [edx - 1]
xor eax, eax
rep stosd dword es:[edi], eax
jmp 0x410ed8
mov ecx, ebx
call fcn.0041190f
jmp 0x410fe4
cmp ecx, eax
jne 0x410f2e
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0x10]
mov eax, dword [0x43572c]
mov dword [eax + ecx*4], esi
mov ecx, dword [ebp - 0x10]
inc ecx
jmp 0x410fbe
add ecx, 2
mov dword [ebp - 4], ecx
movzx eax, word [ecx]
mov esi, dword [ebp - 0x1c]
test ax, ax
jne 0x4110f2
jmp 0x411161
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x410f00
jmp 0x410f13
mov ecx, eax
call fcn.0040dba0
jmp 0x411005
mov esi, dword [ebp - 0x18]
mov ecx, dword [0x435730]
jmp 0x410d54
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 0x41ead1
mov ecx, dword [ebp - 4]
jmp 0x41112a
cmp edx, 1
jle 0x410e0e
cmp word [esi + edx*2 - 2], bx
jne 0x410e0e
add esi, 2
sub edx, 2
xor eax, eax
mov dword [ebp - 0xc], esi
push 0x40262c
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 0x41eb88
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 0x4112ec
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll_ferror]
add esp, 4
test eax, eax
jne 0x4112ec
mov eax, ebx
sub eax, edi
cmp eax, 0x200
jae 0x4112cb
add ebx, 0x100
test esi, esi
jne 0x4114b7
mov ecx, ebx
call fcn.0040dc10
mov esi, eax
test esi, esi
je 0x41eb56
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 0x41145d
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll__pclose]
add esp, 4
lea edx, [edi*2 + 4]
mov ecx, esi
call fcn.0040dc60
mov ebx, eax
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x41eb18
cmp dword [0x435730], 0
je 0x41eb6c
cmp dword [0x43572c], 0
je 0x41eb6c
test ebx, ebx
je 0x41eb6c
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 [0x431590]
call fcn.0040e188
test eax, eax
je 0x41eb33
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 0x41144a
cmp word [eax - 2], 0xa
jne 0x41144a
xor ecx, ecx
mov word [eax], cx
jmp 0x410e4d
push 0
xor edx, edx
mov ecx, esi
call fcn.0040bb40
mov ecx, dword [0x435730]
mov esi, eax
mov dword [ebp - 0xc], esi
movzx edx, word [esi]
jmp 0x410d97
cmp eax, 0x22
je 0x411511
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 0x41ebb4
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.0040dc10
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x41eba3
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 0x41eb29
mov eax, dword [ebp - 0x20]
cmp eax, edi
jne 0x410ffa
mov ebx, dword [ebp - 0x1c]
jmp 0x411346
mov ecx, 0xa
mov word [eax], cx
add eax, 2
mov dword [ebp - 0x3c], eax
jmp 0x411389
mov edi, esi
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x411462
push dword [ebp - 0x1c]
sub edi, ecx
call dword [sym.imp.msvcrt.dll_feof]
add esp, 4
test eax, eax
je 0x411291
jmp 0x4112ec
mov ecx, dword [ebp - 4]
movzx eax, word [ecx + 8]
add ecx, 0xa
mov dword [ebp - 0x44], eax
mov dword [ebp - 4], ecx
jmp 0x411096
mov edi, dword [ebp - 8]
jmp 0x411096
mov ecx, dword [ebp - 4]
mov ebx, 1
add ecx, 0x10
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ecx
jmp 0x411096
mov edx, ebx
mov ecx, esi
call fcn.0040dc60
test eax, eax
jne 0x4112c1
jmp 0x41eb4f
add ecx, 2
inc edi
mov dword [ebp - 4], ecx
mov dword [ebp - 0x48], edi
jmp 0x411161
dec eax
mov dword [ebp - 0x54], eax
jmp 0x410fee
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 0x41ead1
mov ecx, dword [ebp - 4]
jmp 0x411096
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 0x411530
mov ecx, eax
add eax, 2
cmp word [eax], 0
jne 0x411525
mov dword [ebp - 4], ecx
cmp word [ecx], 0x22
jne 0x4113ba
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 0x4113ba
cmp word [ecx], 0x20
jne 0x4113ba
jmp 0x411540
cmp eax, 0x27
je 0x410bbb
xor esi, esi
jmp 0x410bc3
mov ecx, dword [ebp - 4]
mov ebx, 1
add ecx, 0xe
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ecx
jmp 0x411096
push dword [ebp - 4]
push 1
push 0x234a
call fcn.00407834
add esp, 0xc
mov eax, 1
jmp 0x41104e
push 0
push 0x2374
call fcn.00407834
add esp, 8
call fcn.00429762
push 1
push 0x43fa20
call dword [sym.imp.msvcrt.dll_longjmp]
call fcn.004296f5
jmp 0x410dcf
mov ecx, esi
call fcn.0040dba0
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
jmp 0x411313
xor eax, eax
mov dword [ebp - 0x20], eax
jmp 0x41143a
xor edx, edx
jmp 0x41135e
call fcn.004296f5
jmp 0x410e7a
mov edi, dword [ebp - 0x5c]
mov ebx, dword [ebp - 0x60]
jmp 0x410db0
mov ecx, esi
call fcn.0040dba0
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll__pclose]
add esp, 4
mov eax, 8
jmp 0x41104e
push dword [ebp - 0xc]
push 1
push 0x2374
call fcn.00407834
add esp, 0xc
mov eax, 8
jmp 0x41104e
push esi
push 1
push 0x2331
call fcn.00407834
add esp, 0xc
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
jmp 0x41104e
push ebx
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov eax, 8
jmp 0x41104e
push esi
push 1
push 0x2363
call fcn.00407834
add esp, 0xc
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
jmp 0x41104e