Function at 0x10016100
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [ebp + 8]
push ebx
lea edx, [eax + 0x290]
push esi
mov ecx, eax
push edi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x78], edx
cmp eax, edx
ja 0x10016303
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 0x2c]
mov edi, edi
cmp ecx, 0x39d3
ja 0x10016327
je 0x10016310
cmp ecx, 0x1cde
ja 0x100162f7
je 0x100162ae
mov eax, ecx
sub eax, 0xaf2
je 0x10016209
sub eax, 8
jne case.0x1001633d.14812
push eax
out 0xb6, eax
je 0x1001619a
mov eax, 0x2199
cmp eax, eax
je 0x10016634
add eax, 0x49
cmp eax, 0x2199
jbe 0x10016176
cmp byte [ebp + 0xb], 0
jne case.0x1001633d.14812
mov edi, 0x32c9
mov dword [ebp - 0x20], edi
jmp 0x100161a0
lea ebx, [ebx]
mov eax, edi
sub eax, 0x32c9
je 0x100165ce
sub eax, 0x1a
jne 0x100165fc
mov ecx, dword [esi + 0x14]
sub ecx, dword [esi + 0x10]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x14], eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
test eax, eax
jle 0x100165bf
xor edi, edi
mov dword [ebp - 0x24], edi
xor eax, eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x64], 5
lea esp, [esp]
cmp eax, 0x80
ja case.0x10016202.1
movzx ecx, byte [eax + 0x10016674]
jmp dword [ecx*4 + 0x1001665c]
invalid
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [esi]
mov dword [ebp - 0x88], ecx
mov ecx, dword [ebp + 0x14]
push 0
mov dword [ebp - 0x84], edx
mov edx, dword [ecx]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x24]
push ecx
mov dword [ebp - 0x20], edx
push 0x57d0
lea edx, [ebp - 0x88]
push edx
push 0
call fcn.10014b50
add esp, 0x18
mov dword [ebp - 0x60], eax
jmp 0x1001645e
cmp ecx, 0x1ce6
jne case.0x1001633d.14812
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x5c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x43
mov edx, 0x72
mov word [ebp - 0x10], ax
mov word [ebp - 0xf], dx
jmp case.0x1001633d.14812
lea eax, [ecx - 0x39db]
cmp eax, 0x48
ja case.0x1001633d.14812
movzx eax, byte [eax + 0x1001682c]
jmp dword [eax*4 + 0x10016800]
mov edx, 0x4165
mov word [ebp - 7], dx
mov byte [ebp - 5], 0
jmp case.0x1001633d.14812
mov dword [ebp - 0xe], 0x65746165
jmp case.0x1001633d.14812
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x58]
push 0x36c3
push ecx
call fcn.10030840
add esp, 0xc
mov dword [ebp - 0x74], eax
mov byte [ebp + 0xb], 0
jmp 0x1001645e
mov edx, 0x69
mov eax, 0x6c
mov word [ebp - 9], dx
mov word [ebp - 8], ax
jmp case.0x1001633d.14812
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0x14]
sub edx, ecx
mov eax, 0x2aaaaaab
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x14], 0
test eax, eax
jle 0x1001645e
xor edi, edi
mov edx, dword [ebp + 0x14]
mov eax, dword [edx + 4]
mov edx, dword [edi + ecx + 4]
mov dword [ebp - 4], edx
mov edx, dword [ebp - 4]
mov dl, byte [edx]
cmp dl, byte [eax]
jne 0x100163fb
test dl, dl
je 0x100163f7
mov edx, dword [ebp - 4]
mov dl, byte [edx + 1]
mov byte [ebp - 0x19], dl
cmp dl, byte [eax + 1]
jne 0x100163fb
add dword [ebp - 4], 2
add eax, 2
test dl, dl
jne 0x100163d1
xor eax, eax
jmp 0x10016400
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10016433
mov eax, dword [ebp + 0x14]
mov edx, dword [eax]
mov dword [edi + ecx], edx
mov edx, dword [eax + 4]
mov dword [edi + ecx + 4], edx
mov edx, dword [eax + 8]
mov dword [edi + ecx + 8], edx
mov edx, dword [eax + 0xc]
mov dword [edi + ecx + 0xc], edx
mov edx, dword [eax + 0x10]
mov dword [edi + ecx + 0x10], edx
mov eax, dword [eax + 0x14]
mov dword [edi + ecx + 0x14], eax
mov byte [ebp + 0xb], 1
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0x14]
inc dword [ebp - 0x14]
sub edx, ecx
mov eax, 0x2aaaaaab
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
add edi, 0x18
cmp dword [ebp - 0x14], eax
jl 0x100163c4
mov edi, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x18]
add ecx, 8
mov dword [ebp - 0x18], ecx
cmp ecx, dword [ebp - 0x78]
jbe 0x10016130
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x5c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x4e], 0x33006c
mov dword [ebp - 0x4a], 0x2e0032
jmp case.0x1001633d.14812
mov edx, 0x6b
mov word [ebp - 0x58], dx
mov dword [ebp - 0x56], 0x720065
mov dword [ebp - 0x52], 0x65006e
jmp case.0x1001633d.14812
mov edx, 0xd
mov word [ebp - 0x28], dx
jmp case.0x10016202.1
lea eax, [ebp - 0x28]
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x100164c0
sub eax, ecx
mov esi, ecx
lea edi, [ebx - 1]
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100164d0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
mov eax, ebx
rep movsb byte es:[edi], byte [esi]
lea ecx, [eax + 1]
jmp 0x100164f0
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x100164f0
mov esi, dword [ebp - 0x68]
push 0
sub eax, ecx
lea ecx, [ebp - 0x80]
push ecx
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp - 0x24]
jmp case.0x10016202.1
mov eax, dword [esi + 0x10]
mov eax, dword [edi + eax + 4]
mov edx, 0xa
mov word [ebp - 0x27], dx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10016533
lea ecx, [ebp - 0x7c]
push ecx
sub eax, edx
add eax, 3
push 0x6303
push 0
mov dword [ebp - 0x7c], eax
call fcn.10010150
mov edx, dword [esi + 0x10]
mov ecx, dword [edi + edx + 4]
mov ebx, eax
add esp, 0xc
mov edx, ebx
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x10016560
jmp case.0x10016202.1
push 0
push 0
push ebx
push 0
push 0x7541
call fcn.10031a40
add esp, 0x14
jmp case.0x10016202.1
xor ebx, ebx
mov eax, dword [ebp - 4]
add eax, 0x20
dec dword [ebp - 0x64]
mov dword [ebp - 4], eax
jne 0x100161f0
mov ecx, dword [esi + 0x14]
sub ecx, dword [esi + 0x10]
inc dword [ebp - 0x14]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edi, 0x18
add eax, edx
mov dword [ebp - 0x24], edi
cmp dword [ebp - 0x14], eax
jl 0x100161e0
mov ecx, dword [ebp - 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x20]
jmp 0x100165fc
mov edx, dword [ebp + 0x14]
lea ecx, [esi + 0x10]
push edx
call fcn.10035630
mov eax, dword [esi + 0x20]
push 0
push 0
push 2
push 0
push 3
push 0xc0000000
push eax
call dword [ebp - 0x74]
mov dword [ebp - 0x68], eax
cmp eax, 0xffffffff
je 0x10016303
add edi, 0x1a
mov dword [ebp - 0x20], edi
cmp edi, 0x32e3
jbe 0x100161a0
jmp 0x1001645b
mov dword [ebp - 0x46], 0x6c0064
mov dword [ebp - 0x42], 0x6c
jmp case.0x1001633d.14812
mov edx, 0x46
mov word [ebp - 0xa], dx
jmp case.0x1001633d.14812
pop edi
pop esp
dec ecx
ftst
lea eax, [ebp - 0x3c]
push eax
push 0x6e0f
push 0
call fcn.10028f60
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x6c]
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret