Function at 0x1000219c
Capabilities:
Inspect section memory permissions
Print debug messages
Write file on windows

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x168
mov ebx, dword [esp + 0x17c]
mov edx, dword [ebx + 0x4bc]
test edx, edx
mov esi, dword [esp + 0x180]
jne 0x100021ca
xor eax, eax
mov dword [0x100916d0], eax
mov dword [0x100916d4], eax
mov eax, dword [esi]
test al, 0x10
je 0x100021d7
mov ebp, 0x103204a0
jmp 0x100021e8
and eax, 0x24
cmp eax, 0x24
je 0x10002651
mov ebp, 0x103204b0
mov eax, dword [ebx]
cmp eax, 3
jne 0x10002386
mov eax, dword [esi + 0xc]
mov dword [esp + 0xc0], 2
xor edx, edx
mov edi, 0x103204b8
mov dword [esp + 0xd0], 0x3f800000
mov dword [esp + 0x94], eax
mov dword [esp + 0xa4], edx
mov dword [esp + 0xac], edx
mov dword [esp + 0xa8], edx
mov dword [esp + 0xa0], edx
mov dword [esp + 0x9c], edx
mov dword [esp + 0x98], edx
mov dword [esp + 0xbc], edx
mov dword [esp + 0xb8], edx
mov dword [esp + 0xb4], edx
mov dword [esp + 0xb0], edx
mov dword [esp + 0xd4], 0x3f800000
mov eax, dword [esi + 0x28]
cmp eax, 1
je 0x10002627
cmp eax, 2
je 0x1000260a
cmp eax, 3
je 0x100025ed
cmp eax, 4
je 0x100025d0
cmp eax, 5
jne 0x100022af
mov eax, dword [esp + 0xa4]
or eax, 0x8000000
mov dword [esp + 0xa4], eax
mov edi, 0x103204e0
mov ecx, dword [esp + 0x184]
mov eax, dword [ecx + 8]
mov dword [esp + 0xc4], eax
mov eax, dword [ecx + 0xc]
mov ebx, dword [0x100916d0]
mov dword [esp + 0xc8], eax
mov eax, dword [ecx + 0x10]
mov dword [esp + 0xcc], eax
push dword [ecx + 0xc]
push dword [ecx + 8]
mov eax, dword [esi + 0xc]
push ebp
push dword [esi + 0x24]
cdq
push edi
add ebx, eax
adc edx, dword [0x100916d4]
mov dword [0x100916d0], ebx
mov dword [0x100916d4], edx
mov edx, ebx
sar edx, 9
shr edx, 0x16
add edx, ebx
sar edx, 0xa
push edx
push eax
push 0x10320500
lea ebp, [esp + 0xf8]
push ebp
mov ebx, dword [esp + 0x1a0]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x24
lea eax, [esp + 0xd8]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea edx, [esp + 0x94]
lea eax, [esp + 0x164]
push 0
push eax
push 0x44
push edx
push dword [ebx + 0x4cc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000236b
mov eax, dword [esp + 0x164]
cmp eax, 0x44
je 0x100025c3
push 0x10320560
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, 0xffffff9c
add esp, 0x168
pop ebx
pop ebp
pop esi
pop edi
ret
cmp eax, 4
jl 0x100025c3
cmp eax, 5
jg 0x100025c3
push edx
push ebx
call fcn.10005bf8
mov edi, eax
add esp, 8
mov edx, dword [ebx + 0x14600]
test edx, 0x20000000
jne 0x100024c0
test edx, 0x10000000
jne 0x100024c0
test edx, 0x8000000
jne 0x100024c0
test edi, edi
jne 0x10002497
mov edx, dword [esi + 0x24]
add dword [ebx + edx*4 + 0x14570], 1
mov ecx, dword [ebx + 0x1461c]
test ecx, 0x80000000
je 0x10002468
mov edx, dword [ebx + 0x14560]
add edx, dword [ebx + 0x14568]
mov eax, dword [ebx + 0x14564]
mov ecx, dword [ebx + 0x4e0]
mov dword [ebx + 0x14560], edx
sub ecx, dword [esi + 0xc]
mov dword [esp + 4], ecx
mov dword [ebx + 0x14568], ecx
mov ecx, dword [ebx + eax*4 + 0x4e4]
sub ecx, dword [ebx + eax*4 + 0x4e0]
mov dword [esp], eax
cmp ecx, 1
jle 0x10002442
mov eax, dword [esp + 4]
add ecx, 0xffffffff
cdq
idiv ecx
mov dword [ebx + 0x1456c], eax
jmp 0x1000245a
add edx, dword [esp + 4]
mov dword [ebx + 0x14560], edx
xor edx, edx
mov dword [ebx + 0x14568], edx
mov dword [ebx + 0x1456c], edx
mov edx, dword [esp]
add edx, 1
mov dword [ebx + 0x14564], edx
jmp 0x100024c0
mov edx, dword [ebx + 0x14560]
sub edx, dword [esi + 0xc]
add edx, dword [ebx + 0x4e0]
add edx, dword [ebx + 0x1456c]
mov ecx, dword [ebx + 0x14568]
sub ecx, dword [ebx + 0x1456c]
mov dword [ebx + 0x14560], edx
mov dword [ebx + 0x14568], ecx
jmp 0x100024c0
mov edx, dword [ebx + 0x14560]
sub edx, dword [esi + 0xc]
add edx, dword [ebx + 0x4e0]
xor ecx, ecx
add edx, dword [ebx + 0x14568]
mov dword [ebx + 0x14560], edx
mov dword [ebx + 0x14568], ecx
mov dword [ebx + 0x1456c], ecx
mov edx, dword [esi + 0x28]
mov ecx, 0x103204b8
cmp edx, 1
je 0x10002644
mov edx, dword [ebx + 0x14600]
test edx, 0x40000000
je 0x100024ec
mov edx, dword [esi + 0xc]
mov ecx, 0x103204c8
jmp 0x1000257c
test edx, 0x20000000
je 0x1000251b
mov dword [esi + 0x24], 2
mov ecx, 0x10320578
mov eax, 1
mov dword [ebx + 0x4d8], eax
mov dword [ebx + 0x4e0], eax
mov edx, 1
mov dword [esi + 0xc], eax
jmp 0x1000257c
test edx, 0x10000000
je 0x1000254a
mov dword [esi + 0x24], 2
mov ecx, 0x103204d8
mov eax, 7
mov dword [ebx + 0x4d8], eax
mov dword [ebx + 0x4e0], eax
mov edx, 7
mov dword [esi + 0xc], eax
jmp 0x1000257c
test edx, 0x8000000
je 0x10002579
mov dword [esi + 0x24], 2
mov ecx, 0x103204e0
mov eax, 1
mov dword [ebx + 0x4d8], eax
mov dword [ebx + 0x4e0], eax
mov edx, 1
mov dword [esi + 0xc], eax
jmp 0x1000257c
mov edx, dword [esi + 0xc]
test edi, edi
je 0x10002587
mov eax, 0x103205e0
jmp 0x1000258c
mov eax, 0x103205e8
lea edi, [esp + 8]
push eax
push dword [ebx + 0x14560]
push edx
push dword [ebx + 0x4e0]
push dword [ebx + 0x4d8]
push ecx
push ebp
push dword [esi + 0x24]
push 0x10320580
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x28
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
add esp, 0x168
pop ebx
pop ebp
pop esi
pop edi
ret
mov eax, dword [esp + 0xa4]
or eax, 0x10000000
mov dword [esp + 0xa4], eax
mov edi, 0x103204d8
jmp 0x100022af
mov eax, dword [esp + 0xa4]
or eax, 0x20000000
mov dword [esp + 0xa4], eax
mov edi, 0x103204d0
jmp 0x100022af
mov eax, dword [esp + 0xa4]
or eax, 0x40000000
mov dword [esp + 0xa4], eax
mov edi, 0x103204c8
jmp 0x100022af
mov eax, dword [esp + 0xc0]
or eax, 0x80000000
mov dword [esp + 0xc0], eax
mov edi, 0x103204c0
jmp 0x100022af
mov edx, dword [esi + 0xc]
mov ecx, 0x103204c0
jmp 0x1000257c
mov ebp, 0x103204a8
jmp 0x100021e8