Function at 0x46ae80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x560
push ebx
push esi
push edi
xor esi, esi
push 0x208
lea eax, [ebp - 0x460]
push esi
push eax
mov dword [ebp - 4], esi
call fcn.004c9b50
push 0x100
lea ecx, [ebp - 0x154]
push esi
push ecx
call fcn.004c9b50
push 0x100
lea edx, [ebp - 0x560]
push esi
push edx
call fcn.004c9b50
push 0x104
lea eax, [ebp - 0x258]
push esi
push eax
call fcn.004c9b50
mov ecx, dword [ebp + 8]
add esp, 0x30
push esi
push esi
push 3
push esi
or edi, 0xffffffff
push 1
push SysReAllocString
push ecx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, edi
je 0x46b373
push esi
lea edx, [ebp + 8]
push edx
push 0xc
lea eax, [ebp - 0x44]
push eax
push ebx
mov dword [ebp + 8], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46b373
cmp dword [ebp + 8], 0xc
jne 0x46b373
mov ecx, dword [ebp - 0x40]
movzx ax, byte [ebp - 0x40]
shr ecx, 8
movzx dx, cl
push 4
shl ax, 8
lea ecx, [ebp - 0x44]
or dx, ax
push str.OTTO
push ecx
mov word [ebp - 0x40], dx
call fcn.004d5074
add esp, 0xc
test eax, eax
jne 0x46b373
xor edx, edx
cmp dx, word [ebp - 0x40]
jae 0x46b373
lea esp, [esp]
push 0
lea eax, [ebp + 8]
push eax
push 0x10
lea ecx, [ebp - 0x54]
push ecx
push ebx
mov dword [ebp + 8], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46afbb
cmp dword [ebp + 8], 0
je 0x46afbb
push 4
lea edx, [ebp - 0x54]
push 0x4fb9e8
push edx
call fcn.004d5074
add esp, 0xc
test eax, eax
je 0x46afc7
inc esi
cmp si, word [ebp - 0x40]
jb 0x46af80
jmp 0x46b373
mov ecx, dword [ebp - 0x48]
movzx dx, cl
mov eax, ecx
shl dx, 8
movzx edx, dx
shr ecx, 8
movzx ecx, cl
or edx, ecx
shr eax, 0x10
movzx cx, al
shr eax, 8
shl cx, 8
shl edx, 0x10
movzx eax, al
movzx ecx, cx
or edx, ecx
or edx, eax
mov dword [ebp - 0x48], edx
mov edx, dword [ebp - 0x4c]
movzx ax, dl
mov ecx, edx
shl ax, 8
shr edx, 8
movzx eax, ax
movzx edx, dl
or eax, edx
shr ecx, 0x10
movzx dx, cl
shl dx, 8
movzx edx, dx
shr ecx, 8
shl eax, 0x10
movzx ecx, cl
push 0
or eax, edx
or eax, ecx
push 0
push eax
push ebx
mov dword [ebp - 0x4c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, edi
je 0x46b373
push 0
lea edx, [ebp + 8]
push edx
push 6
lea eax, [ebp - 0xc]
push eax
push ebx
mov dword [ebp + 8], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46b373
cmp dword [ebp + 8], 0
je 0x46b373
mov ecx, dword [ebp - 0xc]
movzx edx, byte [ebp - 0xc]
mov eax, dword [ebp - 0xa]
movzx si, byte [ebp - 8]
shl dx, 8
shr ecx, 8
movzx cx, cl
or cx, dx
movzx edx, byte [ebp - 0xa]
shr eax, 8
shl dx, 8
movzx ax, al
or ax, dx
mov edx, dword [ebp - 8]
shr edx, 8
movzx dx, dl
shl si, 8
or dx, si
mov word [ebp - 0xc], cx
mov word [ebp - 0xa], ax
mov word [ebp - 8], dx
test cx, cx
jne 0x46b370
test ax, ax
je 0x46b370
xor ecx, ecx
xor esi, esi
cmp cx, ax
jae 0x46b1b3
mov edi, edi
push 0
lea edx, [ebp + 8]
push edx
push 0xc
lea eax, [ebp - 0x38]
push eax
push ebx
mov dword [ebp + 8], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46b194
cmp dword [ebp + 8], 0
je 0x46b194
mov ecx, dword [ebp - 0x32]
movzx ax, byte [ebp - 0x32]
movzx di, byte [ebp - 0x30]
shr ecx, 8
movzx dx, cl
mov ecx, dword [ebp - 0x2e]
shr ecx, 8
shl ax, 8
or dx, ax
movzx ax, cl
movzx cx, byte [ebp - 0x2e]
shl cx, 8
or ax, cx
mov word [ebp - 0x2e], ax
mov ecx, dword [ebp - 0x30]
shr ecx, 8
mov word [ebp - 0x32], dx
movzx cx, cl
shl di, 8
movzx edx, dx
or cx, di
sub edx, 1
mov word [ebp - 0x30], cx
je 0x46b188
sub edx, 1
je 0x46b17a
sub edx, 2
jne 0x46b194
movzx edx, ax
movzx eax, cx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x20], eax
jmp 0x46b194
movzx edx, ax
movzx eax, cx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x28], eax
jmp 0x46b194
movzx edx, ax
movzx eax, cx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x24], eax
or eax, 0xffffffff
cmp dword [ebp - 0x10], eax
je 0x46b1a6
cmp dword [ebp - 0x1c], eax
je 0x46b1a6
cmp dword [ebp - 0x18], eax
jne 0x46b1b3
movzx ecx, word [ebp - 0xa]
inc esi
cmp esi, ecx
jl 0x46b0e0
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor eax, eax
mov dword [ebp - 0x14], eax
mov edi, edi
sub eax, 0
je 0x46b1ec
sub eax, 1
je 0x46b1db
mov eax, dword [ebp - 0x1c]
cmp eax, 0xffffffff
je 0x46b2aa
mov esi, dword [ebp - 0x28]
jmp 0x46b1fb
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x46b2aa
mov esi, dword [ebp - 0x24]
jmp 0x46b1fb
mov eax, dword [ebp - 0x18]
cmp eax, 0xffffffff
je 0x46b2aa
mov esi, dword [ebp - 0x20]
movzx edx, word [ebp - 8]
push 0
add edx, eax
add edx, dword [ebp - 0x4c]
push 0
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x46b2ba
cmp esi, 0x104
jl 0x46b226
mov esi, 0x103
push 0
lea eax, [ebp + 8]
push eax
push esi
lea ecx, [ebp - 0x258]
push ecx
push ebx
mov dword [ebp + 8], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46b2ba
cmp dword [ebp + 8], esi
jne 0x46b2ba
mov eax, dword [ebp - 0x14]
sub eax, 0
je 0x46b289
sub eax, 1
je 0x46b276
sub eax, 1
jne 0x46b2aa
push 0x7f
lea edx, [ebp - 0x560]
push edx
push esi
lea eax, [ebp - 0x258]
push eax
push 0
push 0
call edi
jmp 0x46b2aa
push 0x7f
lea ecx, [ebp - 0x154]
push ecx
push esi
lea edx, [ebp - 0x258]
push edx
jmp 0x46b29d
push 0x103
lea eax, [ebp - 0x460]
push eax
push esi
lea ecx, [ebp - 0x258]
push ecx
push 0
push 0
call edi
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x14]
inc eax
cmp eax, 3
mov dword [ebp - 0x14], eax
jl 0x46b1c0
cmp dword [ebp - 4], 0
je 0x46b370
cmp word [ebp - 0x460], 0
jne 0x46b31c
lea edx, [ebp - 0x154]
push edx
lea eax, [ebp - 0x460]
push eax
call fcn.00405470
add esp, 8
cmp word [ebp - 0x560], 0
je 0x46b31c
push 0x4e494c
push 0x104
lea ecx, [ebp - 0x460]
push ecx
call fcn.004017b0
lea edx, [ebp - 0x560]
push edx
push 0x104
lea eax, [ebp - 0x460]
push eax
call fcn.004017b0
xor edx, edx
xor ecx, ecx
mov word [ebp - 0x422], cx
mov word [ebp - 0x116], dx
cmp word [ebp - 0x154], dx
je 0x46b34a
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x154]
push eax
push ecx
call fcn.00401a00
add esp, 8
cmp word [ebp - 0x460], 0
je 0x46b369
mov eax, dword [ebp + 0x10]
lea edx, [ebp - 0x460]
push edx
push eax
call fcn.00401a00
add esp, 8
jmp 0x46b370
mov dword [ebp - 4], 0
or edi, 0xffffffff
test ebx, ebx
je 0x46b382
cmp ebx, edi
je 0x46b382
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc