Function at 0x10002180
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xc0
mov esi, esp
mov dword [esi + 0xa8], ebp
movzx eax, byte [ebp + 0x10]
movzx ecx, byte [ebp + 0xc]
mov dword [esi + 0xac], esp
mov dword [esi + 0xb8], 0xffffffff
lea edx, [esi + 0xb0]
mov dword [esi + 0xb4], 0x10012ab0
mov edi, dword fs:[0]
mov dword [esi + 0xb0], edi
mov dword fs:[0], edx
mov dword [esi + 0x24], 0
mov byte [esi + 0x24], cl
mov byte [esi + 0x25], al
test cl, cl
jne 0x100021e8
test al, al
je 0x10002215
mov dword [esi], esp
push eax
sub esp, 0x30
mov ebx, esp
mov edi, dword [esi + 0x24]
lea ecx, [ebx + 8]
call fcn.100028c0
mov dword [ebx + 4], 0
mov dword [ebx], 0x19191
mov dword [ebx + 0x30], edi
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
call dword [eax + 4]
mov esp, dword [esi]
lea ecx, [esi + 0x54]
call fcn.100028e0
lea edi, [esi + 0x14]
jmp 0x10002244
lea edi, [esi + 0x14]
mov ecx, edi
call fcn.100015e0
mov dword [esi + 0xb8], 2
mov ecx, edi
call fcn.10002900
mov ecx, edi
call fcn.10002920
mov dword [esi + 0xb8], 2
mov ecx, dword [ebp + 8]
push eax
call fcn.100012e0
test al, al
je 0x1000266e
lea ecx, [esi + 0x18]
push dword [esi + 0x14]
call fcn.10007610
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [esi + 0x14]
add eax, 8
mov dword [esi + 0x14], eax
mov edi, ecx
xor edi, 1
or edi, edx
je 0x10002420
mov edi, ecx
or edi, edx
jne 0x100025a0
lea ecx, [esi + 0x18]
push eax
call fcn.10007610
mov ecx, dword [eax]
mov eax, dword [eax + 4]
add dword [esi + 0x14], 8
mov dword [esi + 0x48], ecx
mov dword [esi + 0x4c], eax
push eax
push ecx
lea eax, [esi + 0x90]
push eax
call fcn.100020f0
add esp, 0xc
mov dword [esi + 0xb8], 3
lea eax, [esi + 0x78]
push eax
call fcn.10001f30
add esp, 4
mov dword [esi + 0xb8], 4
lea eax, [esi + 0x90]
push eax
lea eax, [esi + 0x78]
push eax
lea eax, [esi + 0x5c]
push eax
call fcn.10002930
add esp, 0xc
mov dword [esi + 0xb8], 5
push str..dll
lea eax, [esi + 0x5c]
push eax
lea eax, [esi + 0x30]
push eax
call fcn.10002000
add esp, 0xc
lea edi, [esi + 0x5c]
mov ecx, edi
call fcn.100020d0
lea ecx, [esi + 0x78]
call fcn.100020d0
lea ecx, [esi + 0x90]
call fcn.100020d0
mov dword [esi + 0xb8], 6
mov ecx, edi
push 0
lea eax, [esi + 0x30]
push eax
call fcn.100029c0
mov dword [esi + 0xb8], 7
lea eax, [esi + 0x5c]
push eax
call fcn.10002970
add esp, 4
mov ebx, eax
lea edi, [esi + 0x5c]
mov ecx, edi
call fcn.100029f0
test bl, bl
je 0x100023e7
mov byte [esi + 0xc], bl
mov dword [esi + 8], esp
sub esp, 0x24
mov eax, esp
mov dword [esi], eax
lea ecx, [eax + 0xc]
mov dword [esi + 0xb8], 6
mov dword [esi + 0x74], ecx
lea eax, [esi + 0x30]
push eax
call fcn.10002b20
mov eax, dword [esi + 0x48]
mov dword [esi + 4], eax
mov eax, dword [esi + 0x4c]
mov dword [esi + 0x10], eax
mov dword [esi + 0xb8], 8
lea ecx, [esi + 0x54]
lea eax, [esi + 0x48]
push eax
call fcn.10002bd0
mov ecx, dword [esi]
mov dword [ecx], eax
mov eax, dword [esi + 4]
mov dword [ecx + 4], eax
mov eax, dword [esi + 0x10]
mov dword [ecx + 8], eax
mov dword [esi + 0xb8], 6
call fcn.10002a00
mov esp, dword [esi + 8]
lea edi, [esi + 0x5c]
movzx ebx, byte [esi + 0xc]
mov byte [esi + 0x5c], bl
mov dword [esi + 0xb8], 6
lea ecx, [esi + 0x18]
push edi
call fcn.10007600
lea ecx, [esi + 0x14]
call fcn.10002920
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push eax
call dword [edx]
lea ecx, [esi + 0x30]
call fcn.100020d0
jmp 0x10002230
lea ecx, [esi + 0x18]
push eax
call fcn.10007610
mov ecx, dword [eax]
mov eax, dword [eax + 4]
add dword [esi + 0x14], 8
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], eax
lea ecx, [esi + 0x14]
lea eax, [esi + 0x48]
push eax
call fcn.10002bf0
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x2c]
mov dword [esi + 0xb8], 9
push ecx
push eax
lea eax, [esi + 0x90]
push eax
call fcn.100020f0
add esp, 0xc
mov dword [esi + 0xb8], 0xa
lea eax, [esi + 0x78]
push eax
call fcn.10001f30
add esp, 4
mov dword [esi + 0xb8], 0xb
lea eax, [esi + 0x90]
push eax
lea eax, [esi + 0x78]
push eax
lea eax, [esi + 0x5c]
push eax
call fcn.10002930
add esp, 0xc
mov dword [esi + 0xb8], 0xc
push str..dll
lea eax, [esi + 0x5c]
push eax
lea eax, [esi + 0x30]
push eax
call fcn.10002000
add esp, 0xc
lea ecx, [esi + 0x5c]
call fcn.100020d0
lea ecx, [esi + 0x78]
call fcn.100020d0
lea ecx, [esi + 0x90]
call fcn.100020d0
lea ecx, [esi + 0x30]
call fcn.10002cc0
push 0x100165cc
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
add esp, 8
mov edi, eax
lea ecx, [esi + 0x48]
call fcn.10001250
mov ebx, eax
lea ecx, [esi + 0x48]
call fcn.100012b0
push edi
push ebx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [esi + 4], esp
sub esp, 0x24
mov eax, esp
mov dword [esi], eax
lea ecx, [eax + 0xc]
mov dword [esi + 0xb8], 0xd
mov dword [esi + 8], ecx
lea eax, [esi + 0x30]
push eax
call fcn.10002b20
mov eax, dword [esi + 0x28]
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x2c]
mov dword [esi + 0xc], eax
mov dword [esi + 0xb8], 0xe
lea ecx, [esi + 0x54]
lea eax, [esi + 0x28]
push eax
call fcn.10002bd0
mov ecx, dword [esi]
mov dword [ecx], eax
mov eax, dword [esi + 0x10]
mov dword [ecx + 4], eax
mov eax, dword [esi + 0xc]
mov dword [ecx + 8], eax
mov dword [esi + 0xb8], 0xd
call fcn.10002a00
mov esp, dword [esi + 4]
lea ecx, [esi + 0x30]
call fcn.100020d0
lea ecx, [esi + 0x48]
call fcn.100015f0
jmp 0x10002230
mov dword [esi + 0x30], ecx
mov dword [esi + 0x34], edx
lea ecx, [esi + 0x54]
lea eax, [esi + 0x30]
push eax
call fcn.10002bd0
mov eax, dword [eax]
mov dword [esi + 4], eax
test eax, eax
je 0x10002230
mov byte [esi + 0x30], 0x8d
mov dword [esi + 0x34], 8
sub esp, 0xc
movzx eax, byte [esi + 0x5c]
mov byte [esp + 8], al
lea eax, [esi + 0x38]
mov dword [esp], eax
mov dword [esp + 4], str.handler
lea ecx, [esi + 0x30]
call fcn.10007820
cmp dword [esi + 0x34], 0
lea ebx, [esi + 0x38]
je 0x10002629
xor edi, edi
nop word cs:[eax + eax]
mov ecx, ebx
push edi
call fcn.10007520
movsx eax, byte [eax]
lea ecx, [esi + 0x30]
push eax
call fcn.10007500
mov byte [esi], al
mov ecx, ebx
push edi
call fcn.10007520
movzx edx, byte [esi]
mov byte [eax], dl
inc edi
cmp edi, dword [esi + 0x34]
jb 0x10002600
mov ecx, ebx
call fcn.10003d90
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x10002230
mov dword [esi + 0xb8], 0xf
push dword [ebp + 8]
lea ecx, [esi + 0x14]
push ecx
call eax
add esp, 8
jmp 0x10002230
lea ecx, [esi + 0x14]
call fcn.100015e0
mov dword [esi + 0xb8], 0
mov ecx, dword [ebp + 8]
call fcn.10001aa0
lea ecx, [esi + 0x54]
call fcn.10002cd0
mov eax, dword [esi + 0xb0]
mov dword fs:[0], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret