Function at 0x443919
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x640
mov eax, dword [0x5836e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x63c], eax
mov eax, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x640], eax
xor eax, eax
push edi
inc eax
xor edi, edi
push eax
push eax
mov ebx, edi
push esi
mov dword [ebp - 0x620], ebx
call fcn.00421c79
add esp, 0xc
xor ecx, ecx
inc ecx
push ecx
mov ecx, dword [0x5a23ec]
call fcn.004673c5
push edi
test eax, eax
push edi
push 3
setne byte [ebp - 0x619]
xor eax, eax
push edi
inc eax
push eax
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x443aa0
and dword [ebp - 0x618], ebx
lea eax, [ebp - 0x618]
push ebx
push eax
push 0xc
lea eax, [ebp - 0x604]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x443aa0
cmp dword [ebp - 0x618], 0xc
jne 0x443aa0
movzx ecx, byte [ebp - 0x600]
mov ax, word [ebp - 0x600]
movzx edx, byte [ebp - 0x604]
shl cx, 8
shr ax, 8
or cx, ax
shl dx, 8
mov ax, word [ebp - 0x604]
shr ax, 8
movzx ebx, cx
or dx, ax
mov ax, word [ebp - 0x602]
mov word [ebp - 0x600], cx
movzx ecx, byte [ebp - 0x602]
shl cx, 8
shr ax, 8
or cx, ax
mov word [ebp - 0x604], dx
movzx eax, cx
mov word [ebp - 0x602], cx
xor ecx, ecx
inc ecx
cmp dx, cx
jne 0x443a9a
test ax, ax
jne 0x443a9a
xor eax, eax
xor esi, esi
cmp ax, bx
jae 0x443fe7
and dword [ebp - 0x618], 0
lea eax, [ebp - 0x618]
push 0
push eax
push 0x10
lea eax, [ebp - 0x614]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x443a8e
cmp dword [ebp - 0x618], 0
je 0x443a8e
push 4
lea eax, [ebp - 0x614]
push 0x533280
push eax
call fcn.004e1c8c
add esp, 0xc
test eax, eax
je 0x443ac3
movzx eax, word [ebp - 0x600]
inc esi
cmp esi, eax
jl 0x443a47
mov ebx, dword [ebp - 0x620]
test edi, edi
je 0x443ab0
cmp edi, 0xffffffff
je 0x443ab0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f4166
leave
ret 0xc
mov ecx, dword [ebp - 0x608]
mov ebx, ecx
movzx eax, cl
shl ax, 8
movzx edx, ax
movzx eax, cx
mov ecx, dword [ebp - 0x60c]
shr eax, 8
or edx, eax
shr ebx, 0x10
shl edx, 8
movzx eax, bl
or edx, eax
mov eax, ebx
shr eax, 8
xor ebx, ebx
shl edx, 8
or edx, eax
movzx eax, cl
shl ax, 8
movzx esi, ax
mov dword [ebp - 0x608], edx
mov edx, ecx
movzx eax, cx
shr eax, 8
or esi, eax
shr edx, 0x10
shl esi, 8
movzx eax, dl
or esi, eax
mov eax, edx
push ebx
shr eax, 8
shl esi, 8
or esi, eax
push ebx
push esi
push edi
mov dword [ebp - 0x60c], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x443aa0
push ebx
lea eax, [ebp - 0x618]
mov dword [ebp - 0x618], ebx
push eax
push 6
lea eax, [ebp - 0x628]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x443aa0
cmp dword [ebp - 0x618], ebx
je 0x443aa0
mov ax, word [ebp - 0x626]
movzx edx, byte [ebp - 0x626]
movzx ecx, byte [ebp - 0x624]
shr ax, 8
shl dx, 8
or dx, ax
shl cx, 8
mov ax, word [ebp - 0x624]
shr ax, 8
or cx, ax
mov word [ebp - 0x626], dx
xor eax, eax
mov word [ebp - 0x624], cx
mov dword [ebp - 0x62c], ebx
cmp ax, dx
jae 0x443fe7
mov dword [ebp - 0x634], 0x300
xor esi, esi
mov dword [ebp - 0x630], 0x100
push esi
lea eax, [ebp - 0x618]
mov dword [ebp - 0x618], esi
push eax
push 0xc
lea eax, [ebp - 0x5f8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x443f74
cmp dword [ebp - 0x618], 0
je 0x443f74
movzx ecx, byte [ebp - 0x5f2]
xor edx, edx
mov ax, word [ebp - 0x5f2]
inc edx
shl cx, 8
shr ax, 8
or cx, ax
mov word [ebp - 0x5f2], cx
cmp cx, dx
jne 0x443f74
movzx ecx, byte [ebp - 0x5f0]
mov ax, word [ebp - 0x5f0]
shl cx, 8
shr ax, 8
or cx, ax
mov ax, word [ebp - 0x5ee]
mov word [ebp - 0x5f0], cx
movzx ecx, byte [ebp - 0x5ee]
push edx
push esi
shl cx, 8
shr ax, 8
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
or cx, ax
push edi
mov word [ebp - 0x5ee], cx
call esi
movzx ecx, word [ebp - 0x624]
mov dword [ebp - 0x638], eax
movzx eax, word [ebp - 0x5ee]
add eax, dword [ebp - 0x60c]
push 0
push 0
add ecx, eax
push ecx
push edi
call esi
cmp eax, 0xffffffff
je 0x443f63
mov si, word [ebp - 0x5f0]
cmp si, 0x40
ja 0x443f63
push 0x46
lea eax, [ebp - 0x4c]
push 0
push eax
call fcn.004f5a90
and dword [ebp - 0x618], 0
lea eax, [ebp - 0x618]
add esp, 0xc
push 0
push eax
movzx eax, si
add eax, 2
push eax
lea eax, [ebp - 0x4c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x443f63
cmp dword [ebp - 0x618], 0
je 0x443f63
mov si, word [ebp - 0x5f0]
movzx eax, si
cmp eax, 0x46
jae 0x443fee
xor edx, edx
lea ecx, [eax + 1]
mov byte [ebp + eax - 0x4c], dl
cmp ecx, 0x46
jae 0x443fee
mov byte [ebp + ecx - 0x4c], dl
lea ecx, [eax + 2]
cmp ecx, 0x46
jae 0x443fee
mov ebx, edx
mov byte [ebp + ecx - 0x4c], dl
cmp byte [ebp - 0x619], dl
je 0x443deb
push eax
movzx eax, word [ebp - 0x5f4]
push eax
movzx eax, word [ebp - 0x5f6]
push eax
movzx eax, word [ebp - 0x5f8]
push eax
lea eax, [ebp - 0x1dc]
push str.__Platf:__u_Enc:__u_Lang:__u_Len:__u__
push eax
call fcn.00409bc5
add esp, 0x18
lea eax, [ebp - 0x1dc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor edx, edx
mov ecx, eax
cmp dword [ebp - 0x618], edx
jbe 0x443dbc
mov al, byte [ebp + edx - 0x4c]
test al, al
je 0x443da7
cbw
movzx eax, ax
jmp 0x443daa
push 0x2e
pop eax
mov word [ebp + ecx*2 - 0x1dc], ax
inc ecx
inc edx
cmp edx, dword [ebp - 0x618]
jb 0x443d98
push 0x22
pop eax
mov word [ebp + ecx*2 - 0x1dc], ax
lea ecx, [ecx*2 + 2]
cmp ecx, 0x190
jae 0x443fee
mov si, word [ebp - 0x5f0]
xor eax, eax
mov word [ebp + ecx - 0x1dc], ax
mov cx, word [ebp - 0x5f8]
mov eax, 0x300
mov edx, dword [ebp - 0x4c]
cmp cx, ax
mov ax, word [ebp - 0x5f6]
jne 0x443e0f
cmp ax, word [ebp - 0x630]
je 0x443e26
test cx, cx
jne 0x443e86
test ax, ax
je 0x443e26
cmp ax, word [ebp - 0x634]
jne 0x443ef2
test dx, dx
je 0x443e86
movzx esi, si
xor edx, edx
test esi, esi
je 0x443e54
movzx eax, word [ebp + edx*2 - 0x4c]
movzx ecx, al
shl cx, 8
shr ax, 8
or cx, ax
mov word [ebp + edx*2 - 0x3e4], cx
inc edx
cmp edx, esi
jl 0x443e34
add edx, edx
cmp edx, 0x208
jae 0x443fee
xor eax, eax
xor esi, esi
mov word [ebp + edx - 0x3e4], ax
inc esi
cmp word [ebp - 0x3e4], ax
je 0x443ef5
mov dword [ebp - 0x620], esi
lea ebx, [ebp - 0x3e4]
jmp 0x443ef5
cmp cx, word [ebp - 0x630]
jne 0x443ef2
test ax, ax
jne 0x443ef2
test dl, dl
je 0x443ef2
movzx ecx, si
xor edx, edx
mov eax, ecx
cmp byte [ebp + eax - 0x4c], 0x20
jne 0x443eb8
cmp eax, 0x46
jae 0x443fee
mov byte [ebp + eax - 0x4c], dl
sub eax, 1
jns 0x443e9f
cmp ecx, 0x46
jae 0x443fee
mov byte [ebp + ecx - 0x4c], dl
cmp byte [ebp - 0x4c], dl
je 0x443ef2
push 0x21
lea eax, [ebp - 0x5ec]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x4c]
push eax
push edx
push edx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor esi, esi
lea ebx, [ebp - 0x5ec]
inc esi
mov dword [ebp - 0x620], esi
jmp 0x443ef5
xor esi, esi
inc esi
cmp byte [ebp - 0x619], 0
je 0x443f5d
lea eax, [ebp - 0x1dc]
test ebx, ebx
je 0x443f39
push 0x5332d8
push 0xc8
push eax
call fcn.004019cd
push ebx
mov ebx, 0xc8
lea eax, [ebp - 0x1dc]
push ebx
push eax
call fcn.004019cd
push 0x524d9c
push ebx
lea eax, [ebp - 0x1dc]
jmp 0x443f43
push str.___UNKNOWN_FORMAT
push 0xc8
push eax
call fcn.004019cd
mov ecx, dword [0x5a22a0]
lea eax, [ebp - 0x1dc]
push esi
push esi
push eax
call fcn.00410feb
mov ebx, dword [ebp - 0x62c]
xor esi, esi
push esi
push esi
push dword [ebp - 0x638]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
movzx eax, word [ebp - 0x626]
inc ebx
mov dword [ebp - 0x62c], ebx
cmp ebx, eax
jl 0x443bdb
mov ebx, dword [ebp - 0x620]
test ebx, ebx
je 0x443aa0
cmp word [ebp - 0x5ec], 0
lea ecx, [ebp - 0x3e4]
lea eax, [ebp - 0x5ec]
cmove eax, ecx
push eax
push 0x20
push dword [ebp - 0x63c]
call fcn.00401a0b
cmp word [ebp - 0x3e4], 0
lea ecx, [ebp - 0x5ec]
lea eax, [ebp - 0x3e4]
cmove eax, ecx
push eax
push 0x20
push dword [ebp - 0x640]
call fcn.00401a0b
jmp 0x443aa0
mov ebx, eax
jmp 0x443aa0
call fcn.004f4963
int3