Function at 0x10017df7
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10058111
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x10074118]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push esi
push edi
mov eax, dword [0x10074118]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
or esi, 0xffffffff
mov ebx, ecx
mov dword [esp + 0x20], ebx
cmp eax, esi
jne 0x10017e60
xor eax, eax
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.100408d9
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebx + 0x24]
mov edx, dword [ecx]
test edx, edx
je 0x10017e84
mov ecx, dword [ebx + 0x34]
mov edi, dword [ecx]
add edi, edx
cmp edx, edi
jae 0x10017e84
dec dword [ecx]
mov ebx, dword [ebx + 0x24]
mov ecx, dword [ebx]
lea edx, [ecx + 1]
mov dword [ebx], edx
mov byte [ecx], al
jmp 0x10017e40
mov ecx, dword [ebx + 0x4c]
test ecx, ecx
jne 0x10017e8f
mov eax, esi
jmp 0x10017e40
cmp dword [ebx + 0x3c], 0
jne 0x10017eaa
movsx eax, al
push ecx
push eax
call fcn.1004129d
pop ecx
cmp eax, esi
mov eax, dword [ebp + 8]
pop ecx
jne 0x10017e40
jmp 0x10017e8b
push 0
push 8
pop edi
lea esi, [esp + 0x50]
mov byte [esp + 0x17], al
call fcn.1001860a
and dword [esp + 0x78], 0
lea eax, [esp + 0x34]
mov ecx, esi
call fcn.10034b0e
mov esi, eax
call fcn.10019067
mov edi, dword [esp + 0x60]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x4c]
call fcn.10034b0e
mov esi, eax
call fcn.10019067
mov ecx, dword [ebx + 0x3c]
lea esi, [esp + 0x18]
push esi
mov esi, dword [esp + 0x18]
add edi, esi
push edi
mov dword [esp + 0x2c], eax
push dword [esp + 0x2c]
mov eax, dword [ecx]
lea esi, [esp + 0x28]
push esi
lea esi, [esp + 0x24]
push esi
lea edx, [ebx + 0x44]
lea esi, [esp + 0x27]
push esi
push edx
mov dword [esp + 0x44], edx
call dword [eax + 0x14]
jmp 0x10017ffe
cmp eax, 1
jg 0x1001801b
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x4c]
call fcn.10034b0e
mov esi, eax
call fcn.10019067
mov edi, dword [esp + 0x18]
sub edi, eax
je 0x10017f77
lea eax, [esp + 0x44]
lea ecx, [esp + 0x4c]
call fcn.10034b0e
mov esi, eax
call fcn.10019067
push dword [ebx + 0x4c]
push edi
push 1
push eax
call fcn.10041b09
add esp, 0x10
cmp edi, eax
jne 0x10018006
lea eax, [esp + 0x13]
mov byte [ebx + 0x41], 1
cmp dword [esp + 0x1c], eax
jne 0x10018037
test edi, edi
ja 0x10017fa6
cmp dword [esp + 0x60], 0x20
jae 0x10018006
push 0
push 8
pop ebx
lea edi, [esp + 0x50]
call fcn.1001864d
mov ebx, dword [esp + 0x20]
lea eax, [esp + 0x34]
lea ecx, [esp + 0x4c]
call fcn.10034b0e
mov esi, eax
call fcn.10019067
mov edi, dword [esp + 0x60]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x4c]
call fcn.10034b0e
mov esi, eax
call fcn.10019067
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ecx]
lea esi, [esp + 0x18]
push esi
mov esi, dword [esp + 0x18]
add edi, esi
push edi
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x27]
push eax
push dword [esp + 0x40]
call dword [edx + 0x14]
test eax, eax
jge 0x10017f27
or esi, 0xffffffff
push 0
push 1
lea ecx, [esp + 0x54]
call fcn.10004d1a
jmp 0x10017e8b
cmp eax, 3
jne 0x10018006
movsx eax, byte [esp + 0x13]
push dword [ebx + 0x4c]
push eax
call fcn.1004129d
or esi, 0xffffffff
pop ecx
pop ecx
cmp eax, esi
je 0x10018009
mov esi, dword [ebp + 8]
jmp 0x10018009