Function at 0x1003e3a
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x588
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov dword [ebp - 8], 0x80004005
je 0x100414c
mov esi, dword [ebp + 0xc]
cmp esi, ebx
jle 0x100414c
mov edi, 0x104
push 0x1008538
lea eax, [ebp - 0x588]
push edi
push eax
push 0x1001684
push 0x1001664
call dword [sym.imp.SHLWAPI.dll_Ordinal_473]
test eax, eax
jbe 0x1004153
lea eax, [ebp - 0x380]
push edi
push eax
lea eax, [ebp - 0x588]
push eax
call dword [sym.imp.SHLWAPI.dll_Ordinal_306]
lea eax, [ebp - 0x380]
push edi
push eax
call fcn.01003861
lea eax, [ebp - 0x380]
push 7
push eax
push 0x1001a08
lea edi, [ebp - 0x380]
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x1003ed3
lea edi, [ebp - 0x372]
push edi
push 0x1008328
push edi
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push edi
call dword [sym.imp.SHLWAPI.dll_Ordinal_52]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x1004153
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [ebp - 4]
push ebx
push ecx
lea ecx, [ebp - 0x16]
push 2
push ecx
push eax
mov dword [ebp - 4], ebx
call edi
test eax, eax
je 0x1004141
cmp dword [ebp - 4], 2
jne 0x1004141
cmp word [ebp - 0x16], 0xfeff
mov dword [ebp - 0x1c], ebx
jne 0x100403f
lea eax, [esi + esi - 2]
mov dword [ebp - 0x10], eax
add eax, 2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x14], esi
je 0x1004064
lea eax, [ebp - 4]
push ebx
push eax
lea eax, [ebp - 0x178]
push 0xa4
push eax
push dword [ebp - 0xc]
call edi
test eax, eax
je 0x1003fc7
cmp dword [ebp - 4], 0xa4
jne 0x1003fc7
lea eax, [ebp - 0xd0]
push 0x53
push eax
push 0x10014b8
mov word [ebp - 0xd4], bx
call dword [sym.imp.SHLWAPI.dll_SHUnicodeToUnicode]
lea eax, [ebp - 0xd0]
push eax
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
je 0x1003fc0
push ebx
push ebx
push 2
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x1003fc7
mov dword [ebp - 0x1c], 1
lea eax, [ebp - 4]
push ebx
push eax
push dword [ebp - 0x10]
push esi
push dword [ebp - 0xc]
call edi
test eax, eax
je 0x100413a
mov edi, dword [ebp - 4]
shr edi, 1
cmp dword [ebp - 0x1c], ebx
je 0x1004029
mov word [esi + edi*2], bx
lea eax, [ebp - 0x28]
push 8
mov esi, 0x1001560
push eax
push esi
call dword [sym.imp.SHLWAPI.dll_SHUnicodeToUnicode]
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, edi
sub ecx, eax
mov eax, dword [ebp - 0x14]
lea eax, [eax + ecx*2]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpIW]
test eax, eax
jne 0x1004026
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
sub edi, eax
mov esi, dword [ebp - 0x14]
push dword [ebp + 0xc]
mov word [esi + edi*2], bx
push dword [ebp + 8]
push esi
call dword [sym.imp.SHLWAPI.dll_SHUnicodeToUnicode]
jmp 0x1004137
push ebx
push ebx
push ebx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esi - 1]
mov dword [ebp - 0x10], eax
inc eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x14], esi
jne 0x1004070
mov dword [ebp - 8], 0x8007000e
jmp 0x1004141
lea eax, [ebp - 4]
push ebx
push eax
lea eax, [ebp - 0x7c]
push 0x52
push eax
push dword [ebp - 0xc]
call edi
test eax, eax
je 0x10040cb
cmp dword [ebp - 4], 0x52
jne 0x10040cb
lea eax, [ebp - 0x124]
push 0x53
push eax
push 0x10014b8
mov byte [ebp - 0x2a], bl
call dword [sym.imp.SHLWAPI.dll_SHUnicodeToAnsi]
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x10040c4
push ebx
push ebx
push ebx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x10040cb
mov dword [ebp - 0x1c], 1
lea eax, [ebp - 4]
push ebx
push eax
push dword [ebp - 0x10]
push esi
push dword [ebp - 0xc]
call edi
test eax, eax
je 0x100413a
mov eax, dword [ebp - 4]
cmp dword [ebp - 0x1c], ebx
mov dword [ebp - 0x10], eax
je 0x1004124
lea edi, [esi + eax]
lea eax, [ebp - 0x20]
push 8
mov esi, 0x1001560
push eax
push esi
mov byte [edi], bl
call dword [sym.imp.SHLWAPI.dll_SHUnicodeToAnsi]
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
sub edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x1004121
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
sub dword [ebp - 0x10], eax
mov esi, dword [ebp - 0x14]
push dword [ebp + 0xc]
mov eax, dword [ebp - 0x10]
push dword [ebp + 8]
mov byte [eax + esi], bl
push esi
call dword [sym.imp.SHLWAPI.dll_SHAnsiToUnicode]
mov dword [ebp - 8], ebx
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1004153
mov dword [ebp - 8], 0x80070057
cmp dword [ebp - 8], ebx
jge 0x100416a
cmp dword [ebp - 8], 0x80070057
je 0x100416a
mov eax, dword [ebp + 8]
mov dword [ebp - 8], ebx
mov word [eax], bx
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 8