Function at 0x41a077
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x870
mov eax, dword [0x4d8300]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x84c], eax
xor eax, eax
push ebx
mov ebx, eax
mov dword [ebp - 0x818], eax
mov dword [ebp - 0x83c], eax
mov dword [ebp - 0x858], eax
mov dword [ebp - 0x85c], eax
mov dword [ebp - 0x860], eax
push esi
push edi
lea edi, [ebp - 0x814]
and dword [ebp - 0x830], ebx
stosd dword es:[edi], eax
and dword [ebp - 0x840], ebx
and dword [ebp - 0x844], ebx
mov esi, dword [ebp + 8]
stosd dword es:[edi], eax
mov dword [ebp - 0x848], edx
mov dword [ebp - 0x838], ecx
mov dword [ebp - 0x870], 0x4be66c
stosd dword es:[edi], eax
mov dword [ebp - 0x86c], 0x4be670
mov dword [ebp - 0x868], str.w__ccsUTF_16LE
mov dword [ebp - 0x850], ebx
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x82c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
test ecx, ecx
je 0x41a5a9
test edx, edx
je 0x41a5a9
test esi, esi
je 0x41a5a9
mov eax, dword [ebp - 0x84c]
test eax, eax
je 0x41a5a9
cmp byte [ecx], bl
je 0x41a5a9
cmp byte [edx], bl
je 0x41a5a9
cmp byte [esi], bl
je 0x41a5a9
push eax
push esi
call fcn.00481660
pop ecx
pop ecx
test eax, eax
je 0x41a5a9
mov edi, dword [ebp - 0x838]
mov ecx, edi
call fcn.00403761
mov dword [ebp - 0x854], eax
test eax, eax
jne 0x41a18b
push edi
push str.Could_not_convert__s_to_UTF_16
call fcn.0042ed57
pop ecx
jmp 0x41a56b
mov edi, dword [ebp - 0x848]
mov ecx, edi
call fcn.00403761
mov dword [ebp - 0x83c], eax
test eax, eax
je 0x41a17a
mov ecx, esi
call fcn.00403761
mov dword [ebp - 0x858], eax
test eax, eax
jne 0x41a1b6
push esi
jmp 0x41a17b
mov esi, dword [ebp - 0x84c]
mov ecx, esi
call fcn.00403761
mov dword [ebp - 0x85c], eax
test eax, eax
je 0x41a1b3
mov esi, dword [ebp - 0x854]
push str.r__ccsUNICODE
push esi
call fcn.00481459
mov edi, eax
mov dword [ebp - 0x848], edi
pop ecx
pop ecx
test edi, edi
jne 0x41a1f9
push dword [ebp - 0x838]
push str.Could_not_open_file__s_n
jmp 0x41a180
push edi
push 1
lea eax, [ebp - 0x860]
push 2
push eax
call fcn.0048afe7
xor ecx, ecx
add esp, 0x10
inc ecx
cmp eax, ecx
je 0x41a23a
push edi
call fcn.0048c2b6
pop ecx
test eax, eax
jne 0x41a48b
push dword [ebp - 0x838]
push str.Could_not_read_file__s_n
call fcn.0042ed57
pop ecx
pop ecx
jmp 0x41a48b
movzx eax, word [ebp - 0x860]
cmp eax, 0xbbef
je 0x41a255
xor edx, edx
cmp eax, 0xfeff
push 2
pop ecx
cmovne ecx, edx
push 0
push 0
push edi
mov dword [ebp - 0x840], ecx
call fcn.0048bb89
add esp, 0xc
push 2
push esi
call fcn.004891c7
pop ecx
add eax, 2
push eax
call fcn.0047b53f
mov ebx, eax
mov dword [ebp - 0x850], ebx
pop ecx
pop ecx
test ebx, ebx
jne 0x41a294
push str.Could_not_allocate_space_for_temporary_output_name_n
call fcn.0042ed57
jmp 0x41a234
push esi
push ebx
call fcn.0048bbc3
push ebx
call fcn.004891c7
push 0x7e
pop ecx
mov word [ebx + eax*2], cx
mov eax, dword [ebp - 0x840]
push dword [ebp + eax*4 - 0x870]
push ebx
call fcn.00481459
add esp, 0x14
mov dword [ebp - 0x830], eax
test eax, eax
jne 0x41a2d8
push dword [ebp - 0x838]
push str.Could_not_open_temporary_output_file__s_n
jmp 0x41a22e
push edi
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.0048befe
add esp, 0xc
test eax, eax
je 0x41a48b
lea eax, [ebp - 0x804]
push 0x4b18e0
push eax
call fcn.0048c208
push dword [ebp - 0x83c]
mov esi, eax
call fcn.004891c7
push eax
push dword [ebp - 0x83c]
lea ecx, [ebp - 0x804]
lea ecx, [ecx + esi*2]
push ecx
call fcn.0048c35d
add esp, 0x18
test eax, eax
je 0x41a34a
mov esi, dword [ebp - 0x830]
push esi
lea eax, [ebp - 0x804]
push eax
call fcn.0048b7e2
pop ecx
pop ecx
jmp 0x41a468
push dword [ebp - 0x83c]
call fcn.004891c7
add esi, eax
mov dword [esp], 0x4b18e0
lea eax, [ebp - 0x804]
lea eax, [eax + esi*2]
push eax
call fcn.0048c208
pop ecx
pop ecx
test eax, eax
je 0x41a468
and dword [ebp - 0x82c], 0
add esi, eax
mov edi, dword [ebp - 0x858]
xor ebx, ebx
lea eax, [ebp - 0x804]
lea eax, [eax + esi*2]
push edi
push eax
call fcn.004790bb
mov dword [ebp - 0x864], eax
mov dword [ebp + ebx - 0x818], eax
pop ecx
pop ecx
test eax, eax
je 0x41a3dc
push edi
call fcn.004891c7
mov esi, eax
lea edx, [ebp - 0x804]
mov eax, dword [ebp - 0x864]
pop ecx
mov ecx, eax
sub ecx, edx
sar ecx, 1
add esi, ecx
xor ecx, ecx
mov dword [ebp + ebx - 0x828], esi
add ebx, 4
mov word [eax], cx
cmp ebx, 0x10
jb 0x41a388
cmp dword [ebp - 0x818], 0
mov edi, dword [ebp - 0x848]
mov ebx, dword [ebp - 0x830]
jne 0x41a3f7
push ebx
jmp 0x41a337
mov esi, dword [ebp - 0x830]
xor ebx, ebx
mov edi, dword [ebp - 0x85c]
xor eax, eax
mov eax, dword [ebp + eax - 0x82c]
lea ecx, [ebp - 0x804]
push edi
lea eax, [ecx + eax*2]
push eax
push 0x4be870
push esi
call fcn.0040fdf2
add esp, 0x10
inc ebx
mov eax, ebx
shl eax, 2
cmp dword [ebp + eax - 0x818], 0
jne 0x41a407
mov eax, dword [ebp + eax - 0x82c]
lea ecx, [ebp - 0x804]
lea eax, [ecx + eax*2]
push eax
push 0x4be87c
push esi
call fcn.0040fdf2
mov eax, dword [ebp - 0x84c]
add esp, 0xc
mov edi, dword [ebp - 0x848]
mov dword [ebp - 0x844], eax
push edi
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.0048befe
add esp, 0xc
test eax, eax
jne 0x41a2f5
mov ebx, dword [ebp - 0x850]
push edi
call fcn.00481623
mov eax, dword [ebp - 0x830]
pop ecx
test eax, eax
je 0x41a4a3
push eax
call fcn.00481623
pop ecx
cmp dword [ebp - 0x844], 0
je 0x41a561
push 0x4be14c
push ebx
call fcn.00481459
push 0x4be744
push dword [ebp - 0x854]
mov esi, eax
call fcn.00481459
add esp, 0x10
mov edi, eax
test esi, esi
je 0x41a532
test edi, edi
je 0x41a532
xor ebx, ebx
cmp dword [ebp - 0x840], 2
sete bl
inc ebx
jmp 0x41a505
cmp byte [ebp - 0x834], 0xd
je 0x41a505
push edi
push 1
lea eax, [ebp - 0x834]
push ebx
push eax
call fcn.0048c1ce
add esp, 0x10
push esi
push 1
lea eax, [ebp - 0x834]
push ebx
push eax
call fcn.0048afe7
add esp, 0x10
cmp eax, 1
je 0x41a4e9
push esi
call fcn.00481623
push edi
call fcn.00481623
mov ebx, dword [ebp - 0x850]
pop ecx
jmp 0x41a560
push dword [ebp - 0x838]
push str.Could_not_write__s___original_file_has_been_left_unmodified._n
call fcn.0042ed57
and dword [ebp - 0x844], 0
pop ecx
pop ecx
test esi, esi
je 0x41a556
push esi
call fcn.00481623
pop ecx
test edi, edi
je 0x41a561
push edi
call fcn.00481623
pop ecx
test ebx, ebx
je 0x41a56c
push ebx
call fcn.0048c4a4
pop ecx
push dword [ebp - 0x854]
call fcn.004812c6
push ebx
call fcn.004812c6
push dword [ebp - 0x83c]
call fcn.004812c6
push dword [ebp - 0x858]
call fcn.004812c6
push dword [ebp - 0x85c]
call fcn.004812c6
mov eax, dword [ebp - 0x844]
add esp, 0x14
jmp 0x41a5ab
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00475c80
leave
ret