Function at 0x46d1f0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x1bc
push ebx
push ebp
push esi
push edi
call fcn.0046c350
test eax, eax
jne 0x46d213
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1bc
ret
push 0x8000
push 0x4b5e18
call dword [sym.imp.MSVCRT.dll__open]
add esp, 8
cmp eax, 0xffffffff
mov dword [0x4b5dfc], eax
jne 0x46d24d
call dword [sym.imp.MSVCRT.dll__errno]
mov eax, dword [eax]
sub eax, 2
je 0x46d203
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x1bc
ret
call fcn.0046def0
mov ecx, dword [0x4b5dfc]
lea eax, [esp + 0x3c]
push 0x18e
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__read]
add esp, 0xc
cmp eax, 0x18e
je 0x46d293
mov edx, dword [0x4b5dfc]
push edx
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1bc
ret
mov eax, dword [esp + 0x19a]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], eax
call fcn.0046d8e0
mov ecx, dword [esp + 0x10]
cmp ecx, eax
je 0x46d2d3
test ecx, ecx
jne 0x46d549
mov dword [esp + 0x1c], 1
call fcn.0046d8e0
mov dword [esp + 0x28], eax
mov dword [esp + 0x19a], eax
mov eax, dword [0x4b5e14]
mov edx, dword [esp + 0x19e]
test eax, eax
mov dword [esp + 0x10], edx
je 0x46d2f4
lea eax, [esp + 0x10]
push eax
call fcn.0046d8c0
add esp, 4
mov ecx, dword [esp + 0x10]
mov eax, dword [0x4b5e14]
mov edx, dword [esp + 0x1a2]
test eax, eax
lea edi, [ecx + 0x12345678]
mov dword [esp + 0x10], edx
je 0x46d31f
lea eax, [esp + 0x10]
push eax
call fcn.0046d8c0
add esp, 4
mov ecx, dword [esp + 0x10]
mov eax, dword [0x4b5e14]
mov edx, dword [esp + 0x1a6]
test eax, eax
lea esi, [ecx + 0x12345678]
mov dword [esp + 0x10], edx
je 0x46d34a
lea eax, [esp + 0x10]
push eax
call fcn.0046d8c0
add esp, 4
mov ecx, dword [esp + 0x10]
mov eax, dword [0x4b5e14]
mov edx, dword [esp + 0x1aa]
test eax, eax
lea ebx, [ecx + 0x12345678]
mov dword [esp + 0x10], edx
je 0x46d375
lea eax, [esp + 0x10]
push eax
call fcn.0046d8c0
add esp, 4
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x3d]
mov edx, dword [esp + 0x41]
mov dword [esp + 0x19e], eax
mov dword [esp + 0x10], eax
mov eax, dword [0x4b5e14]
lea ebp, [ecx + 0x12345678]
mov ecx, dword [esp + 0x45]
mov dword [esp + 0x1a2], edx
mov edx, dword [esp + 0x49]
test eax, eax
mov dword [esp + 0x1a6], ecx
mov dword [esp + 0x1aa], edx
je 0x46d3c5
lea eax, [esp + 0x10]
push eax
call fcn.0046d8c0
add esp, 4
mov ecx, dword [esp + 0x10]
mov eax, dword [0x4b5e14]
add edi, ecx
mov ecx, dword [esp + 0x1a2]
test eax, eax
mov dword [esp + 0x10], ecx
je 0x46d3ec
lea edx, [esp + 0x10]
push edx
call fcn.0046d8c0
add esp, 4
mov eax, dword [esp + 0x1a6]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [0x4b5e14]
add esi, ecx
test eax, eax
je 0x46d413
lea ecx, [esp + 0x10]
push ecx
call fcn.0046d8c0
add esp, 4
mov ecx, dword [esp + 0x10]
mov eax, dword [0x4b5e14]
mov edx, dword [esp + 0x1aa]
add ebx, ecx
test eax, eax
mov dword [esp + 0x10], edx
je 0x46d43a
lea eax, [esp + 0x10]
push eax
call fcn.0046d8c0
add esp, 4
mov cx, word [esp + 0x1b2]
mov edx, dword [esp + 0x1b0]
mov eax, dword [esp + 0x1ae]
mov word [esp + 0x24], cx
mov ecx, dword [esp + 0x1b1]
and edx, 0xff
add ebx, edx
mov edx, dword [esp + 0x10]
and ecx, 0xff
mov dword [esp + 0x20], eax
add ecx, edx
mov edx, dword [esp + 0x1b2]
and edx, 0xff
add ebp, ecx
mov ecx, dword [esp + 0x1b3]
and eax, 0xff
add edx, edi
and ecx, 0xff
add edx, eax
mov eax, dword [esp + 0x1af]
mov dword [esp + 0x18], edx
and eax, 0xff
add ecx, esi
push 6
lea edx, [esp + 0x1b2]
push str.
mov dword [esp + 0x1c], ebp
push edx
lea ebp, [ecx + eax]
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x46d4e4
xor eax, eax
mov dl, byte [esp + eax + 0x20]
mov cl, 0x56
sub cl, al
add dl, cl
mov byte [esp + eax + 0x20], dl
inc eax
cmp eax, 6
jl 0x46d4d0
mov eax, dword [esp + 0x19a]
mov dword [esp + 0x10], eax
add ebx, eax
mov edx, dword [0x4b5dfc]
push 0x18e
push 0x4b6140
push edx
call dword [sym.imp.MSVCRT.dll__read]
add esp, 0xc
cmp eax, 0x18e
jne 0x46d6a2
mov al, byte [0x4b6140]
cmp al, 0x53
jne 0x46d5ea
mov ecx, 0x40
mov esi, 0x4b6140
mov edi, 0x4b5cf8
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsx ecx, byte [eax + 0x4b5cf9]
add ebx, ecx
inc eax
cmp eax, 0xff
jl 0x46d536
jmp 0x46d4f1
push 1
call fcn.0046d930
mov ecx, dword [esp + 0x14]
add esp, 4
cmp ecx, eax
je 0x46d2d3
push 0xffffffffffffffff
call fcn.0046d930
mov ecx, dword [esp + 0x14]
add esp, 4
cmp ecx, eax
je 0x46d2d3
call fcn.0046d8e0
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.0046db20
add esp, 8
test eax, eax
jne 0x46d2d3
push 1
call fcn.0046d930
mov edx, dword [esp + 0x14]
push eax
push edx
call fcn.0046db20
add esp, 0xc
test eax, eax
jne 0x46d2d3
push 0xffffffffffffffff
call fcn.0046d930
push eax
mov eax, dword [esp + 0x18]
push eax
call fcn.0046db20
add esp, 0xc
test eax, eax
jne 0x46d2d3
mov ecx, dword [0x4b5dfc]
push ecx
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
mov eax, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1bc
ret
cmp al, 0x4c
je 0x46d5f6
cmp al, 0x44
jne 0x46d4f1
mov eax, dword [0x4b5e14]
mov edx, dword [0x4b618c]
test eax, eax
mov dword [esp + 0x10], edx
je 0x46d616
lea eax, [esp + 0x10]
push eax
call fcn.0046d8c0
add esp, 4
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, dword [0x4b5e14]
add edx, ecx
mov dword [esp + 0x14], edx
mov edx, dword [0x4b6190]
test eax, eax
mov dword [esp + 0x10], edx
je 0x46d644
lea eax, [esp + 0x10]
push eax
call fcn.0046d8c0
add esp, 4
mov ecx, dword [esp + 0x10]
mov eax, dword [0x4b5e14]
add ebx, ecx
mov ecx, dword [0x4b6194]
test eax, eax
mov dword [esp + 0x10], ecx
je 0x46d66a
lea edx, [esp + 0x10]
push edx
call fcn.0046d8c0
add esp, 4
mov eax, dword [0x4b6198]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x10], eax
mov eax, dword [0x4b5e14]
add ebp, ecx
test eax, eax
je 0x46d68f
lea ecx, [esp + 0x10]
push ecx
call fcn.0046d8c0
add esp, 4
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
add eax, edx
mov dword [esp + 0x18], eax
jmp 0x46d4f1
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], eax
mov eax, dword [0x4b5e14]
test eax, eax
je 0x46d6c0
lea ecx, [esp + 0x10]
push ecx
call fcn.0046d8c0
add esp, 4
mov eax, dword [0x4b5e14]
mov edx, dword [esp + 0x10]
test eax, eax
mov dword [0x4b618c], edx
mov dword [esp + 0x10], ebx
je 0x46d6e4
lea eax, [esp + 0x10]
push eax
call fcn.0046d8c0
add esp, 4
mov eax, dword [0x4b5e14]
mov ecx, dword [esp + 0x10]
test eax, eax
mov dword [0x4b6190], ecx
mov dword [esp + 0x10], ebp
je 0x46d708
lea edx, [esp + 0x10]
push edx
call fcn.0046d8c0
add esp, 4
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov dword [0x4b6194], eax
mov eax, dword [0x4b5e14]
test eax, eax
mov dword [esp + 0x10], ecx
je 0x46d72f
lea edx, [esp + 0x10]
push edx
call fcn.0046d8c0
add esp, 4
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
test ecx, ecx
mov dword [0x4b6198], eax
je 0x46d855
mov esi, dword [sym.imp.MSVCRT.dll__close]
mov edi, dword [0x4b618c]
mov ebx, dword [0x4b6190]
mov ebp, dword [0x4b6194]
mov dword [esp + 0x38], eax
mov eax, dword [0x4b5dfc]
push eax
call esi
push 0x8002
push 0x4b5e18
call dword [sym.imp.MSVCRT.dll__open]
add esp, 0xc
cmp eax, 0xffffffff
mov dword [0x4b5dfc], eax
jne 0x46d795
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
add esp, 0x1bc
ret
lea ecx, [esp + 0x3c]
push 0x18e
push ecx
push eax
call dword [sym.imp.MSVCRT.dll__read]
add esp, 0xc
cmp eax, 0x18e
je 0x46d7cc
mov edx, dword [0x4b5dfc]
push edx
call esi
add esp, 4
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1bc
ret
mov edx, dword [0x4b5dfc]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x38]
push 0
push 0
push edx
mov dword [esp + 0x1a6], eax
mov dword [esp + 0x196], edi
mov dword [esp + 0x19a], ebx
mov dword [esp + 0x19e], ebp
mov dword [esp + 0x1a2], ecx
call dword [sym.imp.MSVCRT.dll__lseek]
mov ecx, dword [0x4b5dfc]
lea eax, [esp + 0x48]
push 0x18e
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__write]
mov edx, dword [0x4b5dfc]
push edx
call esi
push 0x8000
push 0x4b5e18
call dword [sym.imp.MSVCRT.dll__open]
add esp, 0x24
cmp eax, 0xffffffff
mov dword [0x4b5dfc], eax
jne 0x46d896
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
add esp, 0x1bc
ret
push 0x10
lea eax, [esp + 0x18e]
push 0x4b618c
push eax
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x46d891
mov ecx, dword [0x4b5dfc]
push ecx
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
mov eax, 5
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1bc
ret
mov eax, dword [0x4b5dfc]
push 0
push 0
push eax
call dword [sym.imp.MSVCRT.dll__lseek]
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1bc
ret