Function at 0x1000377c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x10010008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 6
mov ebx, ecx
mov si, dx
push 1
push 2
mov word [ebp - 0x1a], si
call dword [ebx + 0x1ac]
mov ecx, eax
lea eax, [ebx + 0x1a4]
push 4
push eax
push 0x1006
push 0xffff
push ecx
mov dword [ebx + 0x190], ecx
call dword [ebx + 0x1b0]
mov ecx, dword [ebx + 0x190]
cmp ecx, 0xffffffff
je 0x100039d2
push 0x10
lea eax, [ebx + 0x194]
push eax
push ecx
call dword [ebx + 0x1c0]
test eax, eax
jne 0x100039b5
mov al, byte [ebp + 8]
lea ecx, [ebp - 0x18]
and dword [ebp - 0x18], 0
mov byte [ebp - 5], al
lea eax, [ebp - 8]
push 4
push eax
mov byte [ebp - 8], 1
mov word [ebp - 7], si
call fcn.10004d5c
push 0x11
call fcn.1000be20
pop ecx
mov esi, eax
mov ecx, esi
call fcn.10003254
mov edi, eax
mov eax, dword [ebp - 0x18]
push 0
push 0x11
push esi
mov dword [edi + esi], eax
lea ecx, [edi + esi]
mov eax, dword [ebp - 8]
mov dword [ecx + 4], eax
push dword [ebx + 0x190]
call dword [ebx + 0x1c8]
test eax, eax
jle 0x1000399e
push 0
push 0x11
push esi
push dword [ebx + 0x190]
call dword [ebx + 0x1cc]
cmp eax, 0x11
jne 0x1000399a
mov ecx, esi
call fcn.1000326f
test al, al
je 0x10003996
and dword [ebp - 0x18], 0
lea ecx, [ebp - 0x18]
push 0xd
pop eax
sub eax, edi
push eax
lea eax, [esi + 4]
add eax, edi
push eax
call fcn.10004d5c
mov eax, dword [edi + esi]
cmp eax, dword [ebp - 0x18]
jne 0x10003992
lea eax, [edi + esi]
mov eax, dword [eax + 4]
mov dword [ebp - 8], eax
mov cl, byte [ebp - 8]
cmp cl, 0x7e
jne 0x10003985
mov ecx, eax
shr ecx, 8
cmp cx, word [ebp - 0x1a]
jne 0x10003981
shr eax, 0x18
cmp al, byte [ebp + 8]
jne 0x1000397d
push 0xfffffffffffffffe
pop ecx
call fcn.1000329e
push eax
call fcn.10002e2b
push esi
call fcn.1000be1b
push 0x401
call fcn.1000be20
mov esi, 0x200
mov dword [ebp - 0x18], eax
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push esi
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0xd373f151
mov dword [ebp - 0x10], 0xb33a5371
mov word [ebp - 0xc], 0x32d2
mov byte [ebp - 0xa], 0xff
call fcn.10001ea2
mov eax, 0x10010a94
mov esi, ecx
mov edi, eax
push 0x1000d6a0
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov edi, dword [ebp - 0x18]
add esp, 0x24
mov esi, eax
jmp 0x1000394c
push eax
push 1
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
push 0
push 0x400
push edi
push dword [ebx + 0x190]
call dword [ebx + 0x1cc]
push esi
test eax, eax
jg 0x1000393f
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
pop ecx
push dword [ebx + 0x190]
call dword [ebx + 0x1b4]
xor eax, eax
inc eax
jmp 0x100039e3
push 9
jmp 0x100039a0
push 8
jmp 0x100039a0
cmp cl, 0xff
jne 0x1000398e
push 0xa
jmp 0x100039a0
push 7
jmp 0x100039a0
push 6
jmp 0x100039a0
push 5
jmp 0x100039a0
push 4
jmp 0x100039a0
push 3
pop ecx
call fcn.1000329e
push eax
call fcn.10002e2b
pop ecx
push esi
call fcn.1000be1b
jmp 0x100039c3
push 2
pop ecx
call fcn.1000329e
push eax
call fcn.10002e2b
pop ecx
push dword [ebx + 0x190]
call dword [ebx + 0x1b4]
jmp 0x100039e1
xor ecx, ecx
inc ecx
call fcn.1000329e
push eax
call fcn.10002e2b
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1000bb3f
leave
ret