Function at 0x10a45c0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x90
mov eax, dword [ebp + 0x78]
push ebx
push esi
mov esi, dword [eax + 0x54]
mov ecx, dword [esi + 0xf0]
mov edx, dword [esi + 0xf8]
push edi
mov dword [ebp + 0x68], ecx
mov ecx, dword [esi + 0xf4]
xor edi, edi
mov dword [ebp + 0x60], ecx
mov ecx, dword [esi + 0x15c]
inc edi
cmp word [eax + 0x70], di
mov dword [ebp + 0x64], edx
mov dword [ebp + 0x6c], ecx
jne 0x10a4615
mov ebx, dword [eax + 0x20]
test ebx, ebx
je 0x10a4615
cmp dword [ebx + 0x50], 0x400
je 0x10a47d5
test byte [eax], 8
jne 0x10a47d5
mov ebx, dword [sym.imp.msvcrt.dll_fseek]
push 0
push ecx
push edx
call ebx
add esp, 0xc
test eax, eax
jne 0x10a470c
push dword [ebp + 0x64]
lea eax, [ebp - 0x20]
push edi
push 0x5b
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
je 0x10a4661
push edi
push 2
push esi
call fcn.010a2357
mov word [esi + 0xd6], di
jmp 0x10a4a2a
mov eax, dword [ebp + 0x7c]
and dword [ebp + 4], 0
push 0
push dword [ebp + 0x6c]
mov dword [ebp], eax
push dword [ebp + 0x64]
call ebx
add esp, 0xc
test eax, eax
jne 0x10a470c
push dword [ebp + 0x64]
lea eax, [ebp - 0x20]
push edi
push 0x5b
push eax
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
cmp eax, edi
jne 0x10a470c
movzx eax, word [ebp - 0x20]
add dword [ebp + 0x6c], eax
push 0
push dword [ebp + 0x6c]
push dword [ebp + 0x64]
call ebx
add esp, 0xc
test eax, eax
jne 0x10a470c
push dword [ebp + 0x64]
lea eax, [ebp + 0x3c]
push edi
push 0x24
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
jne 0x10a470c
mov eax, dword [ebp + 0x7c]
and dword [ebp + 0x4c], 0
push 0
push dword [ebp + 0x6c]
inc eax
push dword [ebp + 0x64]
mov dword [ebp + 0x7c], eax
mov dword [ebp + 0x48], eax
call ebx
add esp, 0xc
test eax, eax
jne 0x10a470c
push dword [ebp + 0x64]
lea eax, [ebp + 0x3c]
push edi
push 0x24
push eax
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
cmp eax, edi
jne 0x10a470c
push 2
push 0
push dword [ebp + 0x64]
call ebx
add esp, 0xc
test eax, eax
je 0x10a4728
push edi
push 2
push esi
call fcn.010a2357
mov word [esi + 0xd4], di
mov word [esi + 0xd6], di
jmp 0x10a48a1
cmp word [esi + 0xd2], 2
jne 0x10a47d2
cmp word [esi + 0xd4], 0
jne 0x10a47d2
mov eax, dword [esi + 0x3ac]
mov dword [ebp + 0x6c], eax
mov eax, dword [ebp + 0x7c]
mov dword [ebp + 0x7c], eax
push 0
push dword [ebp + 0x6c]
push dword [ebp + 0x68]
call ebx
add esp, 0xc
test eax, eax
jne 0x10a4a21
push dword [ebp + 0x68]
lea eax, [ebp + 0x3c]
push edi
push 0x24
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
jne 0x10a47c5
mov eax, dword [ebp + 0x7c]
and dword [ebp + 0x4c], 0
inc dword [ebp + 0x7c]
push 0
push dword [ebp + 0x6c]
mov dword [ebp + 0x48], eax
push dword [ebp + 0x68]
call ebx
add esp, 0xc
test eax, eax
jne 0x10a4a21
push dword [ebp + 0x68]
lea eax, [ebp + 0x3c]
push edi
push 0x24
push eax
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
cmp eax, edi
jne 0x10a4a21
movzx eax, word [ebp + 0x3c]
add dword [ebp + 0x6c], eax
jmp 0x10a4753
mov eax, dword [ebp + 0x68]
test byte [eax + 0xc], 0x10
je 0x10a4a21
mov eax, dword [ebp + 0x78]
cmp word [esi + 0xd2], 2
jne 0x10a48a1
xor ebx, ebx
cmp word [esi + 0xd4], bx
jne 0x10a48a1
test byte [eax], 8
jne 0x10a48a1
cmp dword [esi + 0x388], ebx
jne 0x10a482b
push edi
push 0x800
call dword [sym.imp.msvcrt.dll_calloc]
cmp eax, ebx
pop ecx
pop ecx
mov dword [esi + 0x388], eax
jne 0x10a4822
push edi
push ebx
jmp 0x10a4a24
mov word [esi + 0x38c], 0x800
push dword [ebp + 0x60]
mov ebx, dword [esi + 0x388]
push edi
lea eax, [ebp + 0x3c]
push 0x24
push eax
mov dword [ebp + 0x78], ebx
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
je 0x10a4858
mov eax, dword [ebp + 0x60]
test byte [eax + 0xc], 0x10
je 0x10a4a21
mov eax, dword [ebp + 0x60]
test byte [eax + 0xc], 0x10
je 0x10a48b1
push dword [esi + 0xf4]
call dword [sym.imp.msvcrt.dll_fflush]
push dword [esi + 0xf4]
call dword [sym.imp.msvcrt.dll_fclose]
and dword [esi + 0xf4], 0
add esi, 0x134
push esi
push dword [0x10dd26c]
call dword [sym.imp.msvcrt.dll_wcscpy]
push dword [0x10dd268]
call fcn.01078da7
add esp, 0x14
pop edi
pop esi
xor ax, ax
pop ebx
add ebp, 0x70
leave
ret 8
mov ebx, dword [ebp + 0x78]
mov ecx, dword [ebp + 0x3c]
xor eax, eax
mov ax, word [esi + 0x38c]
add ecx, 0xffffffdc
cmp ax, cx
mov dword [ebp + 0x7c], ecx
jae 0x10a48fa
lea ebx, [eax + 0x200]
movzx eax, bx
push eax
push dword [esi + 0x388]
call dword [sym.imp.msvcrt.dll_realloc]
test eax, eax
pop ecx
pop ecx
je 0x10a4a21
mov word [esi + 0x38c], bx
mov dword [esi + 0x388], eax
mov dword [ebp + 0x78], eax
mov ebx, eax
movzx eax, word [ebp + 0x7c]
push dword [ebp + 0x60]
mov dword [ebp + 0x7c], eax
push eax
push edi
push ebx
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, dword [ebp + 0x7c]
jne 0x10a4a21
inc word [ebp + 0x42]
lea ecx, [ebp + 0x3e]
mov ecx, dword [ecx]
mov eax, 0x1011b74
cmp ecx, dword [eax]
jne 0x10a4949
movzx eax, word [ebx + 0x1a]
lea ecx, [eax + ebx - 0x24]
lea eax, [ebp + 0x3c]
push eax
mov ax, word [ebx + 0x18]
call fcn.010a3f63
test ax, ax
jne 0x10a4a21
lea ecx, [ebp + 0x3e]
mov ecx, dword [ecx]
mov eax, 0x1011b6c
cmp ecx, dword [eax]
jne 0x10a496a
movzx eax, word [esi + 0x3a4]
mov ecx, dword [esi + 0x3a0]
mov eax, dword [ecx + eax*4]
mov dword [ebp + 0x58], eax
push dword [ebp + 0x68]
mov ebx, dword [sym.imp.msvcrt.dll_fwrite]
push edi
lea eax, [ebp + 0x3c]
push 0x24
push eax
call ebx
add esp, 0x10
cmp eax, edi
jne 0x10a4a21
lea ecx, [ebp + 0x3e]
mov ecx, dword [ecx]
mov eax, 0x1011b74
cmp ecx, dword [eax]
jne 0x10a49a0
mov word [esi + 0x154], 2
jmp 0x10a49d0
lea ecx, [ebp + 0x3e]
mov ecx, dword [ecx]
mov eax, 0x1011b3c
cmp ecx, dword [eax]
jne 0x10a49b9
mov word [esi + 0x154], 5
jmp 0x10a49d0
lea ecx, [ebp + 0x3e]
mov ecx, dword [ecx]
mov eax, 0x1011b6c
cmp ecx, dword [eax]
jne 0x10a49e0
mov word [esi + 0x154], 3
push dword [ebp + 0x68]
call dword [sym.imp.msvcrt.dll_ftell]
pop ecx
mov dword [esi + 0x150], eax
push dword [ebp + 0x68]
push dword [ebp + 0x7c]
push edi
push dword [ebp + 0x78]
call ebx
add esp, 0x10
cmp eax, dword [ebp + 0x7c]
jne 0x10a4a21
mov ebx, dword [ebp + 0x60]
push ebx
push edi
lea eax, [ebp + 0x3c]
push 0x24
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
je 0x10a4a12
test byte [ebx + 0xc], 0x10
je 0x10a4a21
test byte [ebx + 0xc], 0x10
je 0x10a48ae
jmp 0x10a4861
push edi
push 0
push esi
call fcn.010a2357
mov word [esi + 0xd4], di
jmp 0x10a48a1