Function at 0x10043220
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x40
mov eax, dword [0x10139d00]
xor eax, esp
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x44]
push ebx
push ebp
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 1
mov dword [esp + 0x30], eax
xor eax, eax
push SysReAllocString
push ecx
mov dword [esp + 0x24], ebx
xor ebp, ebp
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x40], bl
mov dword [esp + 0x41], eax
mov dword [esp + 0x45], eax
mov dword [esp + 0x49], eax
mov dword [esp + 0x4d], eax
mov dword [esp + 0x51], eax
mov dword [esp + 0x55], eax
mov dword [esp + 0x59], eax
mov word [esp + 0x5d], ax
mov byte [esp + 0x5f], al
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0xc], eax
cmp eax, 0xffffffff
jne 0x1004329e
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.100d0738
add esp, 0x40
ret
push esi
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea ecx, [edi - 0x15]
mov dword [esp + 0x1c], edi
cmp ecx, 0x268391ab
ja 0x10043349
cmp dword [0x101dd394], edi
ja 0x10043369
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
and eax, 0xfff00000
add eax, 0x100000
push 0x3000
push eax
push ebx
mov dword [0x101dd394], eax
call esi
mov edx, dword [0x101dd394]
push 4
push 0x3000
push edx
push 0
mov dword [0x101dd390], eax
call esi
mov esi, dword [0x101dd390]
mov dword [0x101dd398], eax
test esi, esi
je 0x1004332b
test eax, eax
jne 0x1004336f
push 0x8000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [0x101dd398]
mov dword [0x101dd390], ebx
test eax, eax
je 0x10043343
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [0x101dd398], ebx
mov dword [0x101dd394], ebx
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.100d0738
add esp, 0x40
ret
mov esi, dword [0x101dd390]
push 0x400
push 0
push esi
call fcn.100d4cc0
mov ecx, dword [esp + 0x20]
add esp, 0xc
push 0
lea eax, [esp + 0x1c]
push eax
push 0x400
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x18]
cmp eax, 0x400
je 0x100433aa
test eax, eax
je 0x10043349
cmp eax, edi
jne 0x10043349
mov eax, dword [esp + 0x58]
cmp eax, 7
je 0x100435e3
cmp eax, 8
je 0x100435e3
mov esi, dword [0x101dd390]
mov eax, dword [esi]
test eax, eax
je 0x1004345d
cmp eax, 0xefbeadde
je 0x1004345d
mov eax, edi
sub eax, dword [esi + 4]
test eax, eax
js 0x100433f9
cmp eax, 0x40
ja 0x100433f9
mov dword [esp + 0x10], 1
lea ebx, [esi + 0x14]
lea ebp, [edi - 0x14]
jmp 0x1004345d
cmp dword [esi + 0x40], ebx
jne 0x1004345d
cmp dword [esi + 0xc4], ebx
jne 0x1004345d
call fcn.100443a0
test eax, eax
je 0x1004345d
test al, 1
jne 0x1004345d
cmp eax, 0x40
ja 0x1004345d
push 0x101dd3c0
lea ebx, [esi + 0xdc]
lea ebp, [edi - 0xdc]
lea edx, [esp + 0x30]
push 0x100
mov ecx, 8
mov esi, 0x101dd39c
lea edi, [esp + 0x34]
push edx
mov dword [esp + 0x1c], 1
rep movsd dword es:[edi], dword [esi]
call fcn.1006c040
mov esi, dword [0x101dd390]
mov edi, dword [esp + 0x28]
add esp, 0xc
cmp byte [esi + 0xc6], 0
mov eax, dword [esi + 0x19a]
mov dword [esp + 0x20], eax
jne 0x10043542
cmp byte [esi + 0x189], 0
jne 0x10043542
lea edx, [esi + 0xc7]
mov eax, 0x41
mov ecx, 0x101dd520
mov ebx, edx
mov ebp, dword [ebx]
cmp ebp, dword [ecx]
jne 0x100434e2
sub eax, 4
add ecx, 4
add ebx, 4
cmp eax, 4
jae 0x10043493
mov cl, byte [ecx]
cmp cl, byte [ebx]
jne 0x100434e2
push 0x101dd3c0
lea edx, [esp + 0x30]
push 0x100
mov ecx, 8
mov esi, 0x101dd39c
lea edi, [esp + 0x34]
push edx
mov dword [esp + 0x1c], 1
rep movsd dword es:[edi], dword [esi]
call fcn.1006c040
mov edi, dword [esp + 0x28]
add esp, 0xc
jmp 0x10043530
add esi, 0x108
push esi
mov ecx, 0x101dd39c
mov dword [esp + 0x14], 3
call fcn.10042a30
add esp, 4
test eax, eax
jne 0x10043530
mov eax, dword [0x101dd390]
lea edx, [eax + 0xc7]
add eax, 0x108
push eax
mov ecx, 0x101dd4fc
mov dword [esp + 0x14], 2
call fcn.10042a30
add esp, 4
test eax, eax
je 0x10043349
mov ebx, dword [0x101dd390]
add ebx, 0x19e
lea ebp, [edi - 0x19e]
cmp dword [esp + 0x10], 0
je 0x10043349
mov esi, dword [esp + 0x14]
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp edi, ebp
jae 0x10043564
mov edi, ebp
mov ecx, dword [0x101dd390]
push 0
lea eax, [esp + 0x1c]
push eax
push edi
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10043349
cmp dword [esp + 0x18], edi
jne 0x10043349
mov eax, dword [0x101dd398]
push 0
lea edx, [ebx - 0x14]
push edx
push 0x101dd3c0
push ebp
push eax
push ebx
call fcn.1006c050
mov ebx, dword [esp + 0x38]
mov ecx, dword [0x101dd398]
movzx edx, bl
mov al, bl
neg al
neg edx
add esp, 0x18
and al, 0xf
lea esi, [ecx + ebx]
test dl, 0xf
jne 0x100435c6
mov al, 0x10
movzx ecx, al
lea esp, [esp]
cmp al, byte [esi]
jne 0x1004369e
inc esi
sub ecx, 1
jne 0x100435d0
jmp 0x100436a6
mov eax, dword [0x101dd390]
cmp dword [eax], ebx
jne 0x10043349
cmp dword [eax + 0x10], ebx
jne 0x10043349
cmp byte [eax + 0x18], 4
lea edi, [eax + 0x18]
jne 0x10043349
cmp dword [eax + 0x79], ebx
jne 0x10043349
cmp byte [eax + 0x98], 4
lea esi, [eax + 0x98]
jne 0x10043349
cmp byte [eax + 0xdc], 4
lea edx, [eax + 0xdc]
jne 0x10043349
mov ecx, dword [eax + 0x16c]
push 0
push 0
push esi
push edi
mov dword [esp + 0x30], ecx
push 0x20
lea ecx, [eax + 0x11d]
add eax, 0x59
push 0x101dd39c
push eax
call fcn.10042dd0
push 0x101dd3c0
lea edx, [esp + 0x4c]
mov esi, eax
push 0x100
mov ecx, 8
lea edi, [esp + 0x50]
push edx
rep movsd dword es:[edi], dword [esi]
call fcn.1006c040
mov ebx, dword [0x101dd390]
mov ebp, dword [esp + 0x44]
mov edi, dword [esp + 0x44]
add esp, 0x28
add ebx, 0x170
add ebp, 0xfffffe90
jmp 0x1004354d
test ecx, ecx
jne 0x10043349
mov eax, dword [esp + 0x24]
push 0
push 0x80
push 2
push 0
push 0
push 0x10000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x10043349
mov edx, dword [0x101dd398]
push 0
lea ecx, [esp + 0x2c]
push ecx
push ebx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, eax
call esi
cmp edi, 1
jne 0x10043349
mov eax, dword [esp + 0x14]
push eax
call esi
mov ecx, dword [esp + 0x4c]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100d0738
add esp, 0x40
ret