Function at 0x45df50
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.004b03e0
push 0x100
lea ecx, [ebp - 0x154]
push esi
push ecx
call fcn.004b03e0
push 0x100
lea edx, [ebp - 0x560]
push esi
push edx
call fcn.004b03e0
push 0x104
lea eax, [ebp - 0x258]
push esi
push eax
call fcn.004b03e0
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 0x45e443
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 0x45e443
cmp dword [ebp + 8], 0xc
jne 0x45e443
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.004bbc44
add esp, 0xc
test eax, eax
jne 0x45e443
xor edx, edx
cmp dx, word [ebp - 0x40]
jae 0x45e443
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 0x45e08b
cmp dword [ebp + 8], 0
je 0x45e08b
push 4
lea edx, [ebp - 0x54]
push 0x4da7c4
push edx
call fcn.004bbc44
add esp, 0xc
test eax, eax
je 0x45e097
inc esi
cmp si, word [ebp - 0x40]
jb 0x45e050
jmp 0x45e443
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 0x45e443
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 0x45e443
cmp dword [ebp + 8], 0
je 0x45e443
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 0x45e440
test ax, ax
je 0x45e440
xor ecx, ecx
xor esi, esi
cmp cx, ax
jae 0x45e283
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 0x45e264
cmp dword [ebp + 8], 0
je 0x45e264
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 0x45e258
sub edx, 1
je 0x45e24a
sub edx, 2
jne 0x45e264
movzx edx, ax
movzx eax, cx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x20], eax
jmp 0x45e264
movzx edx, ax
movzx eax, cx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x28], eax
jmp 0x45e264
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 0x45e276
cmp dword [ebp - 0x1c], eax
je 0x45e276
cmp dword [ebp - 0x18], eax
jne 0x45e283
movzx ecx, word [ebp - 0xa]
inc esi
cmp esi, ecx
jl 0x45e1b0
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor eax, eax
mov dword [ebp - 0x14], eax
mov edi, edi
sub eax, 0
je 0x45e2bc
sub eax, 1
je 0x45e2ab
mov eax, dword [ebp - 0x1c]
cmp eax, 0xffffffff
je 0x45e37a
mov esi, dword [ebp - 0x28]
jmp 0x45e2cb
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x45e37a
mov esi, dword [ebp - 0x24]
jmp 0x45e2cb
mov eax, dword [ebp - 0x18]
cmp eax, 0xffffffff
je 0x45e37a
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 0x45e38a
cmp esi, 0x104
jl 0x45e2f6
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 0x45e38a
cmp dword [ebp + 8], esi
jne 0x45e38a
mov eax, dword [ebp - 0x14]
sub eax, 0
je 0x45e359
sub eax, 1
je 0x45e346
sub eax, 1
jne 0x45e37a
push 0x7f
lea edx, [ebp - 0x560]
push edx
push esi
lea eax, [ebp - 0x258]
push eax
push 0
push 0
call edi
jmp 0x45e37a
push 0x7f
lea ecx, [ebp - 0x154]
push ecx
push esi
lea edx, [ebp - 0x258]
push edx
jmp 0x45e36d
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 0x45e290
cmp dword [ebp - 4], 0
je 0x45e440
cmp word [ebp - 0x460], 0
jne 0x45e3ec
lea edx, [ebp - 0x154]
push edx
lea eax, [ebp - 0x460]
push eax
call fcn.0040f0b0
add esp, 8
cmp word [ebp - 0x560], 0
je 0x45e3ec
push 0x4c2f1c
push 0x104
lea ecx, [ebp - 0x460]
push ecx
call fcn.00401880
lea edx, [ebp - 0x560]
push edx
push 0x104
lea eax, [ebp - 0x460]
push eax
call fcn.00401880
xor edx, edx
xor ecx, ecx
mov word [ebp - 0x422], cx
mov word [ebp - 0x116], dx
cmp word [ebp - 0x154], dx
je 0x45e41a
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x154]
push eax
push ecx
call fcn.0040ee90
add esp, 8
cmp word [ebp - 0x460], 0
je 0x45e439
mov eax, dword [ebp + 0x10]
lea edx, [ebp - 0x460]
push edx
push eax
call fcn.0040ee90
add esp, 8
jmp 0x45e440
mov dword [ebp - 4], 0
or edi, 0xffffffff
test ebx, ebx
je 0x45e452
cmp ebx, edi
je 0x45e452
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