Function at 0x42ac57
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 [0x43c5ac], 0
jne 0x42ab3d
mov byte [0x43c5ac], 1
call fcn.0042c01e
shl eax, 2
lea eax, [eax + eax*4]
call fcn.0042ba1c
mov eax, esp
and eax, 0xfffffff0
mov esp, eax
mov dword [0x43c5b0], eax
mov dword [0x43c5b4], 0
mov ecx, dword [0x439c10]
mov eax, ecx
sub eax, dword [0x439c14]
cmp eax, 7
jle 0x42ab3d
mov ebx, dword [0x439c14]
mov eax, ecx
sub eax, ebx
cmp eax, 0xc
jl 0x42aabc
cmp dword [ebx], 0
jne 0x42aac7
cmp dword [ebx + 4], 0
jne 0x42aac7
mov eax, dword [0x439c14]
lea ebx, [eax + 0xc]
cmp dword [eax + 8], 0
cmovne ebx, eax
cmp dword [ebx], 0
jne 0x42aac7
cmp dword [ebx + 4], 0
je 0x42ab45
cmp ebx, dword [0x439c10]
jae 0x42aafa
mov edi, dword [0x439934]
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
add eax, dword [ecx + edi]
add ecx, edi
mov dword [esi + 0x14], eax
lea edx, [esi + 0x14]
push 4
call 0x42ac57
add esp, 4
add ebx, 8
cmp ebx, dword [0x439c10]
jb 0x42aad5
mov eax, dword [0x43c5b4]
test eax, eax
jle 0x42ab3d
xor edi, edi
mov ebx, 8
mov ecx, dword [0x43c5b0]
mov edx, dword [ecx + ebx - 8]
test edx, edx
je 0x42ab35
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 ecx, dword [0x43c5b0]
mov eax, dword [0x43c5b4]
inc edi
add ebx, 0x14
cmp edi, eax
jl 0x42ab10
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebx + 8]
cmp eax, 1
jne 0x42ac4c
add ebx, 0xc
cmp ebx, dword [0x439c10]
jae 0x42aafa
mov edi, dword [ebx + 4]
mov eax, dword [0x439934]
add edi, eax
mov ecx, dword [ebx]
mov edx, dword [ebx + 8]
mov eax, dword [ecx + eax]
cmp dl, 0x20
mov dword [esi + 0x10], edx
movzx edx, dl
mov dword [esi + 0xc], edi
mov dword [esi + 8], eax
je 0x42aba3
cmp edx, 0x10
je 0x42aba7
mov dword [esi + 4], edx
cmp edx, 8
jne 0x42ac3f
movzx edx, byte [edi]
lea edi, [edx - 0x100]
test dl, dl
cmovns edi, edx
mov edx, dword [esi + 4]
jmp 0x42abb9
mov edi, dword [edi]
jmp 0x42abb9
movzx eax, word [edi]
lea edi, [eax - 0x10000]
test ax, ax
cmovns edi, eax
mov eax, dword [esi + 8]
add ecx, dword [0x439934]
sub edi, ecx
add edi, eax
mov dword [esi + 0x18], edi
cmp edx, 0x1f
ja 0x42abf0
xor eax, eax
dec eax
mov ecx, edx
shl eax, cl
test dl, 0x20
mov ecx, 0
cmovne eax, ecx
not eax
cmp edi, eax
jg 0x42ac2d
mov ecx, edx
dec cl
xor eax, eax
dec eax
shl eax, cl
cmp edi, eax
jl 0x42ac2d
mov eax, dword [esi + 0x10]
cmp al, 8
mov edi, 1
je 0x42ac19
movzx eax, al
cmp eax, 0x20
je 0x42ac14
cmp eax, 0x10
jne 0x42ab51
mov edi, 2
jmp 0x42ac19
mov edi, 4
mov ecx, dword [esi + 0xc]
lea edx, [esi + 0x18]
push edi
call 0x42ac57
add esp, 4
jmp 0x42ab51
push edi
push dword [esi + 8]
push dword [esi + 0xc]
push edx
push str._d_bit_pseudo_relocation_at__p_out_of_range__targeting__p__yielding_the_value__p._n
call 0x42ad95
push dword [esi + 4]
push str.__Unknown_pseudo_relocation_bit_size__d._n
call 0x42ad95
push eax
push str.__Unknown_pseudo_relocation_protocol_version__d._n
call 0x42ad95
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov dword [esp], edx
mov esi, ecx
mov ebp, dword [0x43c5b4]
test ebp, ebp
jle 0x42ac93
mov eax, dword [0x43c5b0]
add eax, 0x10
mov ecx, ebp
mov edx, dword [eax - 4]
cmp edx, esi
ja 0x42ac8b
mov ebx, dword [eax]
add edx, dword [ebx + 8]
cmp edx, esi
ja 0x42ad49
add eax, 0x14
dec ecx
jne 0x42ac77
jmp 0x42ac95
xor ebp, ebp
push esi
call fcn.0042bfba
add esp, 4
test eax, eax
je 0x42ad5f
mov ebx, eax
mov eax, dword [0x43c5b0]
lea ecx, [ebp*4]
lea edi, [ecx + ecx*4]
mov dword [eax + edi + 0x10], ebx
mov dword [eax + edi], 0
call fcn.0042c0ad
add eax, dword [ebx + 0xc]
mov ecx, dword [0x43c5b0]
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 0x42ad6a
mov eax, dword [esp + 0x18]
cmp eax, 7
jle 0x42ad06
cmp eax, 8
je 0x42ad43
cmp eax, 0x40
je 0x42ad43
cmp eax, 0x80
je 0x42ad43
jmp 0x42ad15
mov ecx, 4
cmp eax, 2
je 0x42ad1a
cmp eax, 4
je 0x42ad43
mov ecx, 0x40
mov eax, dword [esp + 4]
mov edx, dword [0x43c5b0]
lea edi, [ebp + ebp*4]
lea edx, [edx + edi*4]
mov dword [edx + 4], eax
mov edi, dword [esp + 0x10]
mov dword [edx + 8], edi
push edx
push ecx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x42ad84
inc dword [0x43c5b4]
push dword [esp + 0x34]
push dword [esp + 4]
push esi
call fcn.0042bc88
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret
push esi
push str.Address__p_has_no_image_section
call 0x42ad95
mov eax, dword [0x43c5b0]
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 0x42ad95
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.__VirtualProtect_failed_with_code_0x_x
call 0x42ad95
push edi
push esi
push eax
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x14]
mov dword [esp], eax
mov edi, 2
push edi
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 edi
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.0042c1c8
add esp, 0xc
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
int3