Function at 0x10157d70
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x10250150]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x3c]
push esi
push edi
mov edi, dword [ebp + 8]
push 0
push eax
push 0x14
lea eax, [ebp - 0x28]
mov dword [ebp - 0x54], ecx
push eax
push edi
mov dword [ebp - 0x3c], 0
call ebx
test eax, eax
je 0x1015812e
cmp dword [ebp - 0x3c], 0x14
jne 0x1015812e
mov eax, dword [ebp - 0x18]
cmp eax, 0x400000
ja 0x1015812e
test eax, eax
je 0x1015812e
lea eax, [ebp - 0x44]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [ebp - 0x44]
cmp eax, 0x400000
ja 0x1015812e
cmp dword [ebp - 0x40], 0
jne 0x1015812e
push 0x1025abd4
push dword [ebp - 0x18]
sub eax, 0x14
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x44], eax
call fcn.101e2340
mov esi, eax
add esp, 8
test esi, esi
je 0x1015812e
push 0
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x44]
push esi
push edi
call ebx
test eax, eax
je 0x10158125
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x44]
jne 0x10158125
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push eax
mov dword [ebp - 0x38], 0
call fcn.1014bc80
lea eax, [ebp - 0x38]
push eax
call fcn.1014bc80
mov eax, dword [0x1024ea10]
xor ecx, ecx
add esp, 8
mov dword [ebp - 0x34], ecx
test eax, eax
je 0x10157e77
lea ecx, [ebp - 0x34]
push ecx
push 0x102211fc
call eax
mov ecx, dword [ebp - 0x34]
cmp dword [ebp - 0x30], 0
je 0x101580de
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x101580de
test ecx, ecx
je 0x101580de
push 0
mov dword [ebp - 0x2c], 0x10
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x38]
mov ebx, dword [ebp + 0xc]
push 0x10
mov ecx, dword [eax]
test ebx, ebx
jne 0x10157eba
push 0x102308a4
jmp 0x10157ebf
push 0x102308b8
push eax
call dword [ecx + 0x10]
mov eax, dword [ebp - 0x38]
push dword [ebp - 0x44]
push esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
mov eax, dword [ebp - 0x38]
lea edx, [ebp - 0x2c]
push edx
lea edx, [ebp - 0x14]
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
lea ecx, [ebp - 0x14]
mov edi, 0xc
lea edx, [ebp - 0x28]
lea esp, [esp]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x10157f05
add ecx, 4
add edx, 4
sub edi, 4
jae 0x10157ef0
xor eax, eax
jmp 0x10157f2a
cmp al, byte [edx]
jne 0x10157f25
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x10157f25
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x10157f25
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x10157f25
xor eax, eax
jmp 0x10157f2a
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10157f33
lea edi, [eax + 1]
jmp 0x10157fa7
mov eax, dword [ebp - 0x30]
push 0
push 1
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x30]
push 0x10
mov ecx, dword [eax]
test ebx, ebx
jne 0x10157f52
push 0x102308cc
jmp 0x10157f57
push 0x102308e0
push eax
call dword [ecx + 0x10]
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x44]
push esi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
mov eax, dword [ebp - 0x30]
lea edx, [ebp - 0x2c]
push edx
mov dword [ebp - 0x2c], 0x10
lea edx, [ebp - 0x14]
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
lea ecx, [ebp - 0x14]
mov edi, 0xc
lea edx, [ebp - 0x28]
jmp 0x10157f90
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x101580de
add ecx, 4
add edx, 4
sub edi, 4
jae 0x10157f90
xor edi, edi
mov eax, dword [ebp - 0x34]
push 0
push 0
push 0
mov ecx, dword [eax]
push 8
test ebx, ebx
jne 0x10157fbf
push 0x102308f4
jmp 0x10157fc4
push 0x10230908
push 0x100
push eax
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x34]
lea ebx, [ebp - 0x2c]
mov ecx, dword [ebp - 0x44]
push ebx
push esi
push ecx
mov dword [ebp - 0x2c], ecx
mov edx, dword [eax]
push esi
push eax
call dword [edx + 0x10]
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x48]
push ecx
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x48], 0
add ecx, esi
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x14]
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x48]
mov dword [ebp - 0x2c], eax
push 0x1025abd4
test edi, edi
je 0x10158078
mov eax, dword [ebp - 0x18]
add eax, 2
push eax
call fcn.101e2340
mov edi, eax
add esp, 8
test edi, edi
je 0x101580de
push dword [ebp - 0x2c]
mov eax, dword [ebp - 0x18]
mov ecx, 0x1024ea08
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push esi
push eax
push edi
call fcn.101cbed0
push esi
test eax, eax
je 0x10158059
call fcn.10213517
push edi
call fcn.10213517
add esp, 8
jmp 0x101580e7
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x2c], eax
call fcn.10213517
mov eax, dword [ebp - 0x2c]
add esp, 4
mov byte [edi + eax], 0
mov eax, dword [ebp - 0x2c]
mov byte [edi + eax + 1], 0
jmp 0x101580bf
mov byte [eax + esi], 0
mov eax, dword [ebp - 0x2c]
lea eax, [eax*2 + 2]
push eax
call fcn.101e2340
mov edi, eax
add esp, 8
test edi, edi
je 0x101580de
mov ecx, dword [ebp - 0x2c]
lea eax, [ecx + 1]
push eax
push edi
push ecx
push esi
push 0
push dword [0x1024e2f0]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push esi
call fcn.10213517
mov eax, dword [ebp - 0x2c]
add esp, 4
xor ecx, ecx
mov word [edi + eax*2], cx
mov ecx, dword [ebp - 0x54]
lea eax, [ebp - 0x50]
push eax
mov dword [ebp - 0x50], edi
call fcn.10158f70
push edi
call fcn.10213517
add esp, 4
mov esi, 1
jmp 0x101580e9
push esi
call fcn.10213517
add esp, 4
xor esi, esi
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x101580f6
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x10158103
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x10158110
mov edx, dword [ecx]
push ecx
call dword [edx + 8]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10212f74
mov esp, ebp
pop ebp
ret 8
push esi
call fcn.10213517
add esp, 4
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10212f74
mov esp, ebp
pop ebp
ret 8