Function at 0x40b170
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [0x421420]
cmp edi, 0x1000
jae 0x40b202
cmp byte [0x416bcb], 0
jne 0x40b1e7
push edi
push dword [0x41941c]
push 0x419420
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, 0x7fff
sub eax, edi
push eax
lea eax, [edi + 0x419420]
push eax
push dword [0x410b9c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
mov edi, dword [0x421420]
add esp, 0xc
add edi, eax
mov dword [0x41941c], 0x419420
mov dword [0x421420], edi
cmp edi, 0x7fff
jg 0x40b1dd
invalid
je 0x40b1e7
mov byte [0x416bcb], 1
test edi, edi
jne 0x40b202
mov byte [0x416bca], 0
or al, 0xff
mov byte [0x416bcb], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x41941c]
mov cl, byte [eax]
lea esi, [eax + 1]
movzx ebx, cl
and ebx, 0xffffffbf
mov byte [0x41074a], cl
mov dword [ebp - 4], esi
lea eax, [ebx - 0x20]
cmp eax, 0xf
ja 0x40b237
lea eax, [ebx - 0x1f]
mov ebx, 2
add word [0x41098c], ax
jmp case.0x40b247.6
cmp ebx, 0x1a
ja case.0x40b247.6
movzx eax, byte [ebx + 0x40b640]
jmp dword [eax*4 + 0x40b614]
cmp byte [0x416bca], 0
jne 0x40b5fe
movzx eax, byte [esi + 2]
mov dl, byte [esi]
mov cl, byte [esi + 1]
mov byte [0x410987], al
movzx eax, byte [esi + 3]
mov byte [0x41098e], al
lea eax, [esi + 4]
mov byte [0x416bca], 1
mov esi, eax
mov byte [0x410986], dl
mov byte [0x41074b], cl
mov dword [ebp - 4], eax
mov byte [0x416bce], 0
mov byte [0x416bcf], 0
cmp dl, 1
jne 0x40b2b6
cmp cl, dl
jne case.0x40b247.6
mov byte [0x416bcf], dl
mov byte [0x416bce], dl
jmp 0x40b2f1
cmp dl, 2
jne 0x40b2ce
test cl, cl
jne case.0x40b247.6
mov byte [0x416bcf], 1
mov dl, 1
jmp 0x40b2f1
cmp dl, 3
jne 0x40b2de
xor dl, dl
test cl, cl
je 0x40b2f1
jmp case.0x40b247.6
cmp dl, 4
jne case.0x40b247.6
xor dl, dl
test cl, cl
jne case.0x40b247.6
mov ecx, eax
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b2f6
sub ecx, esi
lea eax, [ecx + 1]
mov ecx, dword [ebp - 4]
push eax
push 0x410990
push eax
lea esi, [ecx + eax]
movzx eax, dl
push ecx
push eax
xor eax, eax
test dl, dl
setne al
dec eax
and eax, 0xfde9
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x40b603
jmp 0x40b341
push ecx
lea ecx, [ebp - 4]
call fcn.0040b070
add esp, 4
mov esi, dword [ebp - 4]
mov edi, dword [0x421420]
jmp case.0x40b247.6
movzx eax, word [esi]
mov ebx, 2
add esi, 2
add word [0x41098c], ax
jmp case.0x40b247.6
movzx eax, word [esi]
add esi, 2
mov ecx, eax
mov word [0x41098c], ax
test cx, cx
je case.0x40b247.6
lea eax, [ecx - 1]
mov word [0x41098c], ax
jmp case.0x40b247.6
mov eax, dword [esi]
add esi, 4
cmp eax, 0xffff
jbe 0x40b399
mov eax, 0xffff
movzx eax, ax
mov word [0x41098c], ax
test ax, ax
je case.0x40b247.6
dec eax
mov word [0x41098c], ax
jmp case.0x40b247.6
mov dword [0x410980], 0
test cl, 0x40
jne 0x40b3f7
movzx edx, word [esi]
mov dword [0x410980], edx
mov al, byte [esi + 2]
add esi, 3
mov byte [0x410749], al
test edx, 0x8000
je case.0x40b247.6
or edx, 0xffff0000
mov dword [0x410980], edx
jmp case.0x40b247.6
movzx eax, byte [esi]
mov byte [0x410980], al
movzx eax, byte [esi + 1]
mov byte [0x410981], al
movzx eax, byte [esi + 2]
mov byte [0x410982], al
movzx eax, byte [esi + 3]
add esi, 4
mov byte [0x410749], al
jmp 0x40b5c2
test cl, 0x40
jne 0x40b4ac
cmp byte [0x416bce], 0
jne 0x40b43c
mov al, byte [esi]
inc esi
movzx ecx, word [esi]
jmp 0x40b44b
movzx eax, word [esi]
mov ecx, eax
and ecx, 0x7ff
shr ax, 0xb
cmp byte [0x41098e], 0
mov byte [0x410749], al
mov dword [0x410980], 0
movzx eax, word [esi + 2]
mov dword [0x410980], eax
lea eax, [esi + 4]
mov word [0x410984], cx
mov dword [ebp - 4], eax
je 0x40b47d
inc eax
mov dword [ebp - 4], eax
push ecx
lea ecx, [ebp - 4]
call fcn.0040b070
mov eax, dword [0x410980]
add esp, 4
test eax, 0x8000
je 0x40b33e
mov esi, dword [ebp - 4]
or eax, 0xffff0000
mov edi, dword [0x421420]
jmp 0x40b5d3
cmp byte [0x41098e], 0
lea ecx, [esi + 6]
movzx eax, byte [esi]
mov byte [0x410749], al
mov ax, word [esi + 1]
mov dword [0x410980], 0
mov word [0x410984], ax
movzx eax, byte [esi + 3]
mov byte [0x410980], al
movzx eax, byte [esi + 4]
mov byte [0x410981], al
movzx eax, byte [esi + 5]
mov dword [ebp - 4], ecx
mov byte [0x410982], al
je 0x40b4f8
lea eax, [ecx + 1]
mov dword [ebp - 4], eax
push ecx
lea ecx, [ebp - 4]
call fcn.0040b070
mov eax, dword [0x410980]
add esp, 4
test eax, 0x800000
je 0x40b33e
mov esi, dword [ebp - 4]
mov edi, dword [0x421420]
jmp 0x40b5ce
mov dword [0x410980], 0
test cl, 0x40
jne 0x40b551
movzx eax, word [esi]
add esi, 2
mov dword [0x410980], eax
test eax, 0x8000
je case.0x40b247.6
or eax, 0xffff0000
jmp 0x40b5d3
movzx eax, byte [esi]
lea ecx, [esi + 2]
mov byte [0x410980], al
movzx eax, byte [esi + 1]
lea esi, [ecx + 1]
mov byte [0x410981], al
movzx eax, byte [ecx]
mov byte [0x410982], al
jmp 0x40b5c2
test cl, 0x40
mov dword [0x410980], 0
lea ecx, [esi + 2]
jne 0x40b59c
cmp byte [0x41098e], 0
movzx eax, word [esi]
mov esi, ecx
mov dword [0x410980], eax
je 0x40b53c
lea esi, [ecx + 1]
jmp 0x40b53c
cmp byte [0x41098e], 0
movzx eax, byte [esi]
mov byte [0x410980], al
movzx eax, byte [esi + 1]
lea esi, [ecx + 1]
mov byte [0x410981], al
movzx eax, byte [ecx]
mov byte [0x410982], al
je 0x40b5c2
inc esi
mov eax, dword [0x410980]
test eax, 0x800000
je case.0x40b247.6
or eax, 0xff000000
mov dword [0x410980], eax
mov eax, dword [0x41941c]
sub eax, esi
mov dword [0x41941c], esi
add edi, eax
mov dword [0x421420], edi
js 0x40b60f
pop edi
pop esi
mov byte [0x41074a], bl
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00402640
xor edx, edx
mov ecx, 0x5dc
call fcn.004081f0
call fcn.00402640
dec esi
mov dl, 64
add byte [edx], dh
mov bl, 0x40
add byte [ebx - 0x4d], ah
inc eax
add byte [edx], ah
mov ah, 0x40
add byte [edx - 0x4b], dh
inc eax
add byte [edx], ah
mov ch, 0x40
add byte [edi + 0x4c0040b3], dh
mov bl, 0x40
add byte [ebx - 0x4e], bl
inc eax
add byte [eax - 0x27ffbf4d], cl
mov ch, 0x40
add byte [eax], al
add dword [edx], eax
add eax, dword [esp + eax]
or cl, byte [edx]
or cl, byte [edx]
or al, byte [17433862]
or cl, byte [edx]
or cl, byte [edx]
or al, byte [edi]
or byte [edx], cl
or cl, byte [edx]
or esp, ecx
int3