Function at 0x441210
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [0x4c3e88]
push edi
mov dword [esp + 0x1c], ecx
call fcn.00412a60
mov eax, dword [0x4c040c]
mov eax, dword [eax + 0xf8]
xor ebp, ebp
and eax, 0x7fffffff
mov byte [esp + 0x17], 0
mov byte [esp + 0x18], 0
mov dword [esp + 0x28], 0xfffffffd
mov dword [esp + 0x24], eax
mov eax, esi
movzx ecx, word [eax]
cmp ecx, 0x20
je 0x44125f
cmp ecx, 9
jne 0x441264
add eax, 2
jmp 0x441252
cmp word [eax], 0x2a
jne 0x44135c
movzx edi, word [eax + 2]
lea esi, [eax + 2]
test edi, 0xffffff80
jne 0x44128f
push 2
push edi
call fcn.0048b9ce
add esp, 8
test eax, eax
je 0x44128f
and edi, 0xffffffdf
movzx eax, di
add eax, 0xffffffbd
cmp eax, 0x11
ja case.0x4412a5.68
movzx ecx, byte [eax + 0x441768]
jmp dword [ecx*4 + 0x441754]
mov byte [esp + 0x18], 1
jmp case.0x4412a5.68
lea edi, [esi + 2]
mov eax, edi
call fcn.0040cc10
movzx edx, al
neg edx
sbb edx, edx
and edx, 6
add edx, 0xa
push edx
push 0
push edi
call fcn.0048c172
mov ebp, edx
add esp, 0xc
mov dword [esp + 0x28], eax
test ebp, ebp
jne 0x4412e8
cmp eax, 0xffffffff
jbe 0x4412f2
mov dword [esp + 0x28], 0xffffffff
xor ebp, ebp
mov ebx, 0x4a14dc
mov eax, esi
call fcn.00409160
mov esi, eax
test esi, esi
je 0x4416ca
sub esi, 2
jmp case.0x4412a5.68
lea eax, [esi + 2]
push eax
call fcn.0048ba16
mov dword [esp + 0x28], eax
add esp, 4
mov ebx, 0x4a14dc
mov eax, esi
call fcn.00409160
mov esi, eax
test esi, esi
je 0x441700
sub esi, 2
jmp case.0x4412a5.68
mov byte [esp + 0x17], 1
cmp word [esi], 0
je 0x441250
add esi, 2
cmp word [esi], 0
je 0x441250
add esi, 2
jmp 0x441250
push 0
push 0x8000000
push 3
push 0
push 3
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x441397
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4c040c]
cmp byte [ecx + 0x104], 0
mov dword [ecx + 0x30], eax
jmp 0x441713
cmp byte [esp + 0x18], 0
je 0x4413c7
mov ecx, dword [esp + 0x1c]
mov al, byte [ecx + 0x17]
test al, al
jne 0x4413af
mov ecx, dword [ecx + 0xc]
mov al, byte [ecx + 0x17]
cmp al, 2
jne 0x4413c7
mov edx, dword [esp + 0x34]
push edx
call fcn.004421f0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov ecx, edi
call fcn.004727f0
mov ebx, eax
and eax, edx
cmp eax, 0xffffffff
jne 0x441401
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4c040c]
push edi
mov dword [ecx + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x34]
push edx
call fcn.004315d0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
cmp edx, ebp
jb 0x441413
ja 0x44140d
cmp ebx, dword [esp + 0x28]
jbe 0x441413
mov ebx, dword [esp + 0x28]
mov edx, ebp
mov eax, ebx
or eax, edx
jne 0x44144e
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x4c46ec]
mov ecx, dword [0x4c040c]
push 1
push 0
push 0xffffffffffffffff
push 0x49e8dc
push edx
mov dword [ecx + 0x30], 0
call fcn.004742b0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
cmp byte [esp + 0x18], 0
je 0x4414ab
mov esi, dword [esp + 0x1c]
push esi
mov cl, 1
mov eax, ebx
call fcn.00430850
cmp eax, 1
jne 0x4414bd
cmp byte [esi + 0x17], 0
mov ebp, esi
jne 0x441473
mov esi, dword [ebp + 0xc]
test byte [esi + 0x15], 8
je 0x441480
mov eax, esi
call fcn.00401160
mov al, byte [esi + 0x17]
cmp al, 1
jne 0x441499
test byte [esi + 0x15], 4
je 0x441494
mov eax, esi
call fcn.0042f790
mov esi, dword [esi + 8]
jmp 0x4414b9
cmp al, 2
jne 0x4414a4
call fcn.00401000
jmp 0x4414b7
mov esi, 0x4c5ff0
jmp 0x4414f2
lea eax, [ebx + 2]
push eax
call fcn.0048a814
add esp, 4
mov esi, eax
test esi, esi
jne 0x4414ee
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [esp + 0x18], 0
jne 0x44169e
mov ecx, dword [esp + 0x34]
push 0x49e828
push 0
push str.Out_of_memory.
call fcn.0042ef30
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov ebp, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x24]
push ecx
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x4c040c]
push edi
mov dword [edx + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x44166c
cmp byte [esp + 0x18], 0
mov eax, dword [esp + 0x20]
mov byte [eax + esi], 0
mov ecx, dword [esp + 0x20]
mov byte [ecx + esi + 1], 0
jne 0x44160b
mov eax, dword [esp + 0x20]
cmp eax, 3
jb 0x441571
cmp byte [esi], 0xef
jne 0x441571
cmp byte [esi + 1], 0xbb
jne 0x441571
cmp byte [esi + 2], 0xbf
jne 0x441571
add eax, 0xfffffffd
push eax
lea edx, [esi + 3]
push edx
push ebp
mov ebx, 0xfde9
call fcn.00474d90
jmp 0x44159d
cmp eax, 2
jb 0x4415b9
cmp byte [esi], 0xff
jne 0x4415b9
cmp byte [esi + 1], 0xfe
jne 0x4415b9
mov dl, 1
mov ecx, esi
test dl, dl
je 0x44158f
lea ecx, [esi + 2]
add eax, 0xfffffffe
push 0
push 1
shr eax, 1
push eax
push ecx
push ebp
call fcn.004742b0
test eax, eax
jne 0x4415a5
mov dword [esp + 0x1c], eax
push esi
call fcn.0048bddf
add esp, 4
cmp byte [ebp + 0x17], 0
jne 0x4415d1
mov esi, dword [ebp + 0xc]
jmp 0x4415d3
mov ebx, dword [esp + 0x24]
xor dl, dl
cmp ebx, 0x4b0
je 0x441583
push eax
push esi
push ebp
call fcn.00474d90
jmp 0x44159d
mov esi, ebp
test byte [esi + 0x15], 8
je 0x4415e0
mov eax, esi
call fcn.00401160
mov al, byte [esi + 0x17]
cmp al, 1
jne 0x4415f9
test byte [esi + 0x15], 4
je 0x4415f4
mov eax, esi
call fcn.0042f790
mov esi, dword [esi + 8]
jmp 0x44160b
cmp al, 2
jne 0x441606
call fcn.00401000
mov esi, eax
jmp 0x44160b
mov esi, 0x4c5ff0
cmp byte [esp + 0x17], 0
je 0x44162f
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
push 0x4a816c
push 0x4a75f8
push esi
xor eax, eax
call fcn.00471f40
add esp, 0x1c
cmp byte [esp + 0x18], 0
je 0x441645
mov esi, dword [esp + 0x20]
mov eax, ebp
call fcn.00412f70
mov dword [eax], esi
jmp 0x44168e
lea ecx, [esi + 2]
jmp 0x441650
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x441650
sub esi, ecx
sar esi, 1
mov eax, ebp
add esi, esi
call fcn.00412f70
mov dword [eax], esi
jmp 0x44168e
xor eax, eax
mov word [esi], ax
mov eax, ebp
call fcn.00412f70
cmp byte [esp + 0x18], 0
mov dword [eax], 0
jne 0x44168e
push esi
call fcn.0048bddf
add esp, 4
mov ecx, dword [esp + 0x18]
push ecx
mov eax, ebp
call fcn.004130c0
test eax, eax
jne 0x4416aa
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
cmp dword [esp + 0x1c], 0
mov ecx, dword [esp + 0x34]
sete dl
movzx eax, dl
push eax
push ecx
call fcn.0042ed60
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov eax, dword [0x4c040c]
cmp byte [eax + 0x104], 0
mov dword [eax + 0x30], 0x57
jne 0x441735
mov edx, dword [0x4c46ec]
push 1
push 0
push 0xffffffffffffffff
push 0x4a12cc
push edx
call fcn.004742b0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov eax, dword [0x4c040c]
cmp byte [eax + 0x104], 0
mov dword [eax + 0x30], 0x57
jne 0x441735
mov eax, dword [0x4c46ec]
push 1
push 0
push 0xffffffffffffffff
push 0x4a12cc
push eax
call fcn.004742b0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov ecx, dword [esp + 0x34]
push 0x49e828
push 0
push 0x4a12cc
call fcn.0042ec70
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4