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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x84
mov eax, dword [0x1008b548]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
xor esi, esi
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], edx
mov eax, esi
mov dword [ebp - 0x70], ecx
mov ebx, esi
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x58], eax
push edi
mov edi, esi
mov dword [ebp - 0x44], edi
test edx, edx
je 0x10001dd5
test ecx, ecx
je 0x10001dd5
cmp dword [ebp - 0x80], eax
je 0x10001dd5
push 0x1006c5a0
push ecx
lea eax, [ebp - 0x3c]
push eax
call fcn.1003b42d
add esp, 0xc
test eax, eax
jne 0x10001d6b
push 2
push esi
push dword [ebp - 0x3c]
call fcn.1003bb21
add esp, 0xc
test eax, eax
jne 0x10001d6b
push dword [ebp - 0x3c]
call fcn.1003c093
mov dword [ebp - 0x54], eax
pop ecx
test eax, eax
je 0x10001d6b
push esi
push esi
push dword [ebp - 0x3c]
call fcn.1003bb21
add esp, 0xc
test eax, eax
jne 0x10001d6b
cmp dword [ebp - 0x54], 0x20
jb 0x10001d6b
push dword [ebp - 0x3c]
inc eax
push 0x20
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.1003b736
add esp, 0x10
cmp eax, 0x20
jne 0x10001d6b
push 8
lea eax, [ebp - 0x2c]
push str.QHDIFF01
push eax
call fcn.10037c04
add esp, 0xc
test eax, eax
jne 0x10001d6b
lea eax, [ebp - 0x24]
push eax
call fcn.10001e9c
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.10001e9c
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x14]
push eax
call fcn.10001e9c
mov edi, dword [ebp - 0x70]
push edi
push dword [ebp - 0x4c]
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x74]
push 0x20
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.10001de6
add esp, 0x20
mov dword [ebp - 0x64], eax
test eax, eax
je 0x10001d68
mov ebx, dword [ebp - 0x4c]
lea eax, [ebp - 0x78]
push edi
push dword [ebp - 0x48]
lea ecx, [ebx + 0x20]
push ecx
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.10001de6
add esp, 0x14
mov dword [ebp - 0x68], eax
test eax, eax
je 0x10001d65
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x54]
sub eax, ecx
sub eax, ebx
sub eax, 0x20
push edi
push eax
lea eax, [ecx + 0x20]
add eax, ebx
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.10001de6
add esp, 0x14
mov dword [ebp - 0x6c], eax
test eax, eax
je 0x10001d5f
push dword [ebp - 0x3c]
call fcn.1003b4ea
pop ecx
cmp eax, 0xffffffff
je 0x10001d5f
push 0x1006c5a0
push dword [ebp - 0x7c]
lea eax, [ebp - 0x3c]
push eax
call fcn.1003b42d
add esp, 0xc
test eax, eax
jne 0x10001d5f
push 2
push esi
push dword [ebp - 0x3c]
call fcn.1003bb21
add esp, 0xc
test eax, eax
jne 0x10001d5f
push dword [ebp - 0x3c]
call fcn.1003c093
mov ebx, eax
mov dword [ebp - 0x84], ebx
pop ecx
cmp ebx, 0xffffffff
je 0x10001d5f
lea ecx, [ebx + 1]
push ecx
call fcn.1003b361
mov edi, eax
mov dword [ebp - 0x70], edi
pop ecx
test edi, edi
je 0x10001d5f
push esi
push esi
push dword [ebp - 0x3c]
call fcn.1003bb21
add esp, 0xc
test eax, eax
jne 0x10001d48
push dword [ebp - 0x3c]
push ebx
push 1
push edi
call fcn.1003b736
add esp, 0x10
cmp eax, ebx
jne 0x10001d48
push dword [ebp - 0x3c]
call fcn.1003b4ea
pop ecx
cmp eax, 0xffffffff
je 0x10001d48
mov ebx, dword [ebp - 0x5c]
lea eax, [ebx + 1]
push eax
call fcn.1003b361
mov dword [ebp - 0x54], eax
pop ecx
test eax, eax
je 0x10001d48
mov edi, dword [ebp - 0x44]
test ebx, ebx
mov ebx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x40], eax
je 0x10001c5d
mov dword [ebp - 0x58], esi
push 8
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x74]
push eax
push edi
call fcn.10001e58
add esp, 0x10
test eax, eax
js 0x10001d3d
cmp eax, 8
jl 0x10001d3d
lea eax, [ebp - 0xc]
push eax
call fcn.10001e9c
pop ecx
mov ecx, dword [ebp - 0x58]
mov dword [ebp + ecx*4 - 0x38], eax
inc ecx
mov dword [ebp - 0x58], ecx
cmp ecx, 2
jle 0x10001b5e
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x38]
lea edx, [eax + ecx]
mov dword [ebp - 0x4c], edx
cmp edx, dword [ebp - 0x5c]
ja 0x10001d3d
add ecx, dword [ebp - 0x54]
push eax
push ecx
lea eax, [ebp - 0x78]
mov dword [ebp - 0x7c], ecx
push eax
push ebx
call fcn.10001e58
add esp, 0x10
test eax, eax
js 0x10001d3d
mov edx, dword [ebp - 0x38]
cmp eax, edx
jne 0x10001d3d
mov ecx, esi
test edx, edx
jle 0x10001c09
mov esi, dword [ebp - 0x48]
mov edi, dword [ebp - 0x7c]
mov ebx, dword [ebp - 0x70]
lea eax, [ecx + esi]
cmp eax, dword [ebp - 0x84]
jae 0x10001bfc
lea eax, [ecx + esi]
mov al, byte [eax + ebx]
add byte [edi + ecx], al
inc ecx
cmp ecx, edx
jl 0x10001be8
mov edi, dword [ebp - 0x44]
xor esi, esi
mov ebx, dword [ebp - 0x50]
add dword [ebp - 0x48], edx
mov edx, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x34]
lea eax, [ecx + edx]
mov dword [ebp - 0x4c], eax
cmp eax, dword [ebp - 0x5c]
ja 0x10001d3d
mov eax, dword [ebp - 0x54]
push ecx
add eax, edx
push eax
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x40]
call fcn.10001e58
add esp, 0x10
test eax, eax
js 0x10001d3d
cmp eax, dword [ebp - 0x34]
jne 0x10001d3d
mov ecx, dword [ebp - 0x48]
add ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x48], ecx
cmp dword [ebp - 0x4c], eax
jb 0x10001b5b
push 1
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x74]
push eax
push edi
call fcn.10001e58
add esp, 0x10
test eax, eax
jne 0x10001d3d
push 1
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x78]
push eax
push ebx
call fcn.10001e58
add esp, 0x10
test eax, eax
jne 0x10001d3d
push 1
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x40]
call fcn.10001e58
add esp, 0x10
test eax, eax
jne 0x10001d3d
push edi
lea eax, [ebp - 0x74]
push eax
call fcn.10002e5e
push ebx
lea eax, [ebp - 0x78]
push eax
call fcn.10002e5e
push dword [ebp - 0x40]
lea eax, [ebp - 0x60]
mov ebx, esi
push eax
mov edi, esi
call fcn.10002e5e
mov eax, dword [ebp - 0x64]
push eax
mov dword [ebp - 0x40], esi
call fcn.1003b4ea
mov eax, dword [ebp - 0x68]
push eax
call fcn.1003b4ea
mov eax, dword [ebp - 0x6c]
push eax
call fcn.1003b4ea
push 0x1006c5b4
push dword [ebp - 0x80]
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x6c], esi
push eax
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], esi
call fcn.1003b42d
add esp, 0x18
test eax, eax
jne 0x10001d3d
push dword [ebp - 0x3c]
push dword [ebp - 0x5c]
push 1
push dword [ebp - 0x54]
call fcn.1003c2d6
add esp, 0x10
cmp eax, dword [ebp - 0x5c]
jne 0x10001d3d
push dword [ebp - 0x3c]
call fcn.1003b4ea
pop ecx
cmp eax, 0xffffffff
push 1
pop eax
cmovne esi, eax
push dword [ebp - 0x54]
call fcn.1003b35c
pop ecx
jmp 0x10001d54
mov eax, dword [ebp - 0x58]
mov edi, dword [ebp - 0x44]
mov ebx, dword [ebp - 0x50]
mov dword [ebp - 0x40], eax
push dword [ebp - 0x70]
call fcn.1003b35c
pop ecx
jmp 0x10001d6b
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x40], eax
mov ebx, dword [ebp - 0x50]
mov edi, dword [ebp - 0x44]
cmp dword [ebp - 0x3c], 0
je 0x10001d7a
push dword [ebp - 0x3c]
call fcn.1003b4ea
pop ecx
test edi, edi
je 0x10001d88
push edi
lea eax, [ebp - 0x60]
push eax
call fcn.10002e5e
test ebx, ebx
je 0x10001d96
push ebx
lea eax, [ebp - 0x60]
push eax
call fcn.10002e5e
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x10001da7
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.10002e5e
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x10001db5
push eax
call fcn.1003b4ea
pop ecx
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x10001dc3
push eax
call fcn.1003b4ea
pop ecx
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x10001dd1
push eax
call fcn.1003b4ea
pop ecx
mov eax, esi
jmp 0x10001dd7
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1002f237
leave
ret