Function at 0x1002af90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10060ab8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x10087354]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebp + 0xc], 0
je 0x1002b1e5
cmp dword [ebp + 0x10], 0
je 0x1002b1e5
mov edi, dword [ebp + 8]
test edi, edi
je 0x1002b1e5
mov dword [ebp - 0x20], 0
call fcn.10007316
mov ecx, eax
test ecx, ecx
je 0x1002b1f9
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0
test edi, 0xffff0000
jne 0x1002b0b3
movzx esi, di
push 0
push esi
call fcn.10006bab
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1002b0d9
mov eax, esi
shr eax, 4
push 6
inc eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x1002b0d9
push esi
push eax
push ebx
call fcn.10007d5b
add esp, 0xc
mov dword [ebp - 0x18], eax
test eax, eax
je 0x1002b0d9
movzx esi, word [eax]
mov edx, 1
mov eax, dword [ebp - 0x10]
mov ebx, esi
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, ebx
or ecx, edx
jge 0x1002b07e
push ebx
lea ecx, [ebp - 0x10]
call fcn.10007513
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
movzx esi, word [ecx]
jmp 0x1002b081
mov ecx, dword [ebp - 0x18]
movzx edx, si
add ecx, 2
push edx
push ecx
push ebx
push eax
call fcn.10045099
push eax
call fcn.10006b70
mov eax, dword [ebp - 0x10]
add esp, 0x14
cmp ebx, dword [eax - 8]
jg 0x1002b203
mov dword [eax - 0xc], ebx
xor ecx, ecx
mov eax, dword [ebp - 0x10]
mov word [eax + ebx*2], cx
jmp 0x1002b0d9
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1002b0c0
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x10]
call fcn.1000778f
push 1
lea eax, [ebp - 0x10]
mov dword [ebp - 4], 1
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.1002c760
add esp, 0xc
mov edx, dword [ebp - 0x10]
or ebx, 0xffffffff
mov byte [ebp - 4], 3
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1002b113
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x14]
call fcn.1002c720
add esp, 4
test al, al
jne 0x1002b13f
lea ecx, [ebp - 0x14]
call fcn.1000674e
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0x80
push 2
push 0
push 5
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1002b122
mov edi, dword [ebp + 0x10]
lea eax, [ebp - 0x1c]
push 0
push eax
push edi
push dword [ebp + 0xc]
mov dword [ebp - 0x1c], 0
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp edi, dword [ebp - 0x1c]
je 0x1002b1a3
lea ecx, [ebp - 0x14]
call fcn.1000674e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], 1
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x1002b1c9
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.10006c72
push 0x80070057
call fcn.10006c72
int3