Function at 0x1000c810
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x30
mov esi, esp
cmp byte [0x100106f0], 0
jne 0x1000c5bd
mov byte [0x100106f0], 1
call fcn.1000cf50
shl eax, 2
lea eax, [eax + eax*4]
call fcn.1000d16c
mov eax, esp
and eax, 0xfffffff0
mov esp, eax
mov ecx, dword [0x1000edc8]
mov dword [0x100106f4], eax
mov dword [0x100106f8], 0
mov eax, ecx
sub eax, dword [0x1000edcc]
cmp eax, 7
jle 0x1000c5bd
mov ebx, dword [0x1000edcc]
mov eax, ecx
sub eax, ebx
cmp eax, 0xc
jl 0x1000c52a
mov ebx, dword [0x1000edcc]
cmp dword [ebx], 0
jne 0x1000c52a
mov ebx, dword [0x1000edcc]
cmp dword [ebx + 4], 0
jne 0x1000c52a
mov ebx, dword [0x1000edcc]
cmp dword [ebx + 8], 0
jne 0x1000c52a
mov ebx, dword [0x1000edcc]
add ebx, 0xc
cmp dword [ebx], 0
jne 0x1000c539
cmp dword [ebx + 4], 0
je 0x1000c5c5
cmp ebx, dword [0x1000edc8]
jae 0x1000c575
mov edi, dword [sym.SWTeTJw.dll_Ordinal_0]
nop word [eax + eax]
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
lea edx, [esi + 0x18]
add eax, dword [ecx + edi]
add ecx, edi
mov dword [esi + 0x18], eax
push 4
call 0x1000c6d0
add esp, 4
add ebx, 8
cmp ebx, dword [0x1000edc8]
jb 0x1000c550
mov eax, dword [0x100106f8]
test eax, eax
jle 0x1000c5bd
xor edi, edi
mov ebx, 8
nop word cs:[eax + eax]
nop
mov ecx, dword [0x100106f4]
mov edx, dword [ecx + ebx - 8]
test edx, edx
je 0x1000c5b5
lea eax, [esi + 0x1c]
push eax
push edx
push dword [ecx + ebx]
push dword [ecx + ebx - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [0x100106f8]
inc edi
add ebx, 0x14
cmp edi, eax
jl 0x1000c590
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebx + 8]
cmp eax, 1
jne 0x1000c6bb
add ebx, 0xc
cmp ebx, dword [0x1000edc8]
jae 0x1000c575
mov eax, dword [sym.SWTeTJw.dll_Ordinal_0]
neg eax
mov dword [esi + 0x14], eax
nop word cs:[eax + eax]
mov ecx, dword [ebx + 4]
mov eax, dword [sym.SWTeTJw.dll_Ordinal_0]
mov edi, dword [esi + 0x14]
mov edx, dword [ebx + 8]
add ecx, eax
mov eax, dword [ebx]
sub edi, eax
cmp dl, 0x20
mov dword [esi + 0x10], edi
mov edi, dword [sym.SWTeTJw.dll_Ordinal_0]
mov eax, dword [eax + edi]
je 0x1000c684
cmp dl, 0x10
je 0x1000c653
cmp dl, 8
jne 0x1000c6ad
movzx edx, byte [ecx]
mov dword [esi + 4], edx
mov edx, dword [esi + 4]
cmp byte [esi + 4], 0
lea edx, [edx - 0x100]
mov dword [esi + 8], edx
mov edx, dword [esi + 8]
cmovns edx, dword [esi + 4]
add eax, dword [esi + 0x10]
mov dword [esi + 8], edx
lea edx, [esi + 0xc]
add eax, dword [esi + 8]
mov dword [esi + 0xc], eax
push 1
jmp 0x1000c691
movzx edx, word [ecx]
mov dword [esi + 4], edx
mov edx, dword [esi + 4]
cmp word [esi + 4], 0
lea edx, [edx - 0x10000]
mov dword [esi + 8], edx
mov edx, dword [esi + 8]
cmovns edx, dword [esi + 4]
add eax, dword [esi + 0x10]
mov dword [esi + 8], edx
lea edx, [esi + 0xc]
add eax, dword [esi + 8]
mov dword [esi + 0xc], eax
push 2
jmp 0x1000c691
add eax, dword [esi + 0x10]
lea edx, [esi + 0xc]
add eax, dword [ecx]
mov dword [esi + 0xc], eax
push 4
call 0x1000c6d0
add esp, 4
add ebx, 0xc
cmp ebx, dword [0x1000edc8]
jb 0x1000c5f0
jmp 0x1000c575
movzx eax, dl
push eax
push str.__Unknown_pseudo_relocation_bit_size__d._n
call 0x1000c810
push eax
push str.__Unknown_pseudo_relocation_protocol_version__d._n
call 0x1000c810
nop word cs:[eax + eax]
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [0x100106f8]
mov edi, edx
mov esi, ecx
test eax, eax
jle 0x1000c70e
mov ecx, dword [0x100106f4]
xor ebp, ebp
add ecx, 0x10
nop
mov edx, dword [ecx - 4]
cmp edx, esi
ja 0x1000c704
mov ebx, dword [ecx]
add edx, dword [ebx + 8]
cmp edx, esi
ja 0x1000c7be
inc ebp
add ecx, 0x14
cmp ebp, eax
jl 0x1000c6f0
jmp 0x1000c710
xor ebp, ebp
mov dword [esp], edi
push esi
call fcn.1000cee0
add esp, 4
test eax, eax
je 0x1000c7d1
mov ebx, eax
mov eax, dword [0x100106f4]
lea ecx, [ebp*4]
lea edi, [ecx + ecx*4]
mov dword [eax + edi + 0x10], ebx
mov dword [eax + edi], 0
call fcn.1000d000
add eax, dword [ebx + 0xc]
mov ecx, dword [0x100106f4]
mov dword [ecx + edi + 0xc], eax
lea ecx, [esp + 4]
push 0x1c
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1000c7dc
mov eax, dword [esp + 0x18]
mov edi, dword [esp]
cmp eax, 0x3f
jg 0x1000c77c
cmp eax, 4
je 0x1000c7b8
cmp eax, 8
je 0x1000c7b8
jmp 0x1000c788
cmp eax, 0x40
je 0x1000c7b8
cmp eax, 0x80
je 0x1000c7b8
mov eax, dword [esp + 4]
mov ecx, dword [0x100106f4]
lea edx, [ebp + ebp*4]
mov dword [ecx + edx*4 + 4], eax
lea edi, [ecx + edx*4]
mov ebx, dword [esp + 0x10]
mov dword [ecx + edx*4 + 8], ebx
push edi
mov edi, dword [esp + 4]
push 0x40
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1000c7f6
inc dword [0x100106f8]
push dword [esp + 0x34]
push edi
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret
push esi
push str.Address__p_has_no_image_section
call 0x1000c810
mov eax, dword [0x100106f4]
lea ecx, [ebp + ebp*4]
push dword [eax + ecx*4 + 0xc]
push dword [ebx + 8]
push str.__VirtualQuery_failed_for__d_bytes_at_address__p
call 0x1000c810
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.__VirtualProtect_failed_with_code_0x_x
call 0x1000c810
nop word [eax + eax]
push esi
push eax
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x10]
mov dword [esp], eax
push 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
add esp, 4
push eax
push 1
push 0x1b
push str.Mingw_w64_runtime_failure:_n
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
push 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
add esp, 4
push dword [esp]
push esi
push eax
call fcn.1000d1a0
add esp, 0xc
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
int3