Function at 0x42204a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
nop
mov eax, dword [ebp + 8]
add eax, 0xc
mov ecx, 0x42e7e2
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [ebp - 8], eax
mov eax, 0
mov ecx, dword [ebp - 8]
cmp eax, ecx
jne 0x4220b6
mov eax, dword [ebp + 8]
add eax, 0xc
mov dword [ebp - 0x14], eax
call sub.msvcrt.dll__errno
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_strerror
add esp, 4
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
push eax
mov eax, str.could_not_write__s:__s
push eax
call fcn.00404020
add esp, 0xc
mov eax, 1
jmp 0x4225b9
mov eax, dword [ebp + 8]
add eax, 0x14
mov ecx, dword [ebp + 8]
add ecx, 0x3c
mov edx, dword [ecx]
mov ecx, 0x28
imul edx, ecx
add edx, 0x178
push edx
mov dword [ebp - 0x18], eax
call fcn.00421f9b
add esp, 4
mov ecx, dword [ebp - 0x18]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
add eax, 0x14
mov ecx, dword [eax]
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
call fcn.00421f58
add esp, 8
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
add ecx, 0xa4
mov eax, 2
mov edx, dword [ecx]
cmp eax, edx
jne 0x422126
mov eax, str.________________________________n__virt___file___size__section_n
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, 0
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
add eax, 0x3c
mov ecx, dword [ebp - 4]
mov edx, dword [eax]
cmp ecx, edx
jge 0x422444
jmp 0x422151
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
jmp 0x42212e
mov eax, dword [ebp + 8]
add eax, 0x38
mov ecx, dword [ebp - 4]
mov edx, 0x64
imul ecx, edx
mov edx, dword [eax]
add edx, ecx
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
add eax, 8
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
add eax, 0x28
mov ecx, dword [ebp + 8]
add ecx, 0x18
mov edx, dword [eax]
mov eax, dword [ecx]
sub edx, eax
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x1c]
add eax, 0x2c
mov ecx, dword [eax]
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x1c]
add eax, 0x3c
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
add ecx, 0xa4
mov eax, 2
mov edx, dword [ecx]
cmp eax, edx
jne 0x4221d3
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, str._6lx__6lx__6lx___s_n
push eax
call sub.msvcrt.dll_printf
add esp, 0x14
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
jmp 0x4221e2
cmp ecx, 0
jne 0x422211
mov eax, dword [ebp - 0x24]
mov dword [0x42e6e1], eax
mov eax, dword [ebp + 8]
add eax, 0x1c
mov ecx, dword [ebp - 0x24]
mov edx, dword [eax]
add ecx, edx
mov dword [0x42e6dd], ecx
jmp 0x4222a0
cmp ecx, 1
jne 0x42222d
mov eax, dword [ebp - 0x24]
mov dword [0x42e6e5], eax
jmp 0x4222a0
cmp ecx, 2
jne 0x422240
jmp 0x4222a0
cmp ecx, 7
jne 0x422269
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, 5
push eax
call fcn.00422017
add esp, 0xc
jmp 0x4222a0
cmp ecx, 5
jne 0x422292
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, 2
push eax
call fcn.00422017
add esp, 0xc
jmp 0x4222a0
cmp ecx, 6
jne 0x4222a0
jmp 0x4222a0
mov eax, dword [ebp + 8]
add eax, 8
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
add edx, 0x34
mov ecx, dword [ebp - 0x1c]
add ecx, 4
mov dword [ebp - 0x30], eax
mov eax, dword [ecx]
shl eax, 2
mov ecx, dword [edx]
add ecx, eax
mov eax, dword [ebp - 0x30]
mov eax, dword [eax]
mov edx, dword [ecx]
cmp eax, edx
jne 0x42235e
mov eax, dword [ebp + 8]
add eax, 0x24
mov ecx, dword [eax]
test ecx, ecx
je 0x422329
mov eax, dword [ebp + 8]
add eax, 0x20
mov ecx, dword [eax]
mov eax, dword [ebp - 0x24]
add ecx, eax
mov eax, dword [ebp + 8]
add eax, 0x24
mov edx, dword [eax]
push edx
push ecx
mov eax, 1
push eax
call fcn.00422017
add esp, 0xc
mov eax, dword [ebp + 8]
add eax, 0x28
mov ecx, dword [eax]
mov eax, dword [ebp - 0x24]
add ecx, eax
mov eax, dword [ebp + 8]
add eax, 0x2c
mov edx, dword [eax]
push edx
push ecx
mov eax, 0xc
push eax
call fcn.00422017
add esp, 0xc
mov eax, dword [ebp + 8]
add eax, 0x34
mov ecx, dword [eax]
test ecx, ecx
je 0x42235e
mov eax, dword [ebp + 8]
add eax, 0x30
mov ecx, dword [eax]
mov eax, dword [ebp - 0x24]
add ecx, eax
mov eax, dword [ebp + 8]
add eax, 0x34
mov edx, dword [eax]
push edx
push ecx
mov eax, 0
push eax
call fcn.00422017
add esp, 0xc
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x20]
push ecx
push eax
call sub.msvcrt.dll_strcpy
add esp, 8
mov eax, dword [ebp - 0x2c]
add eax, 0x24
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx]
shl edx, 2
mov ecx, 0x42e7b0
add ecx, edx
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [ebp - 0x2c]
add eax, 0xc
mov ecx, dword [ebp - 0x24]
mov dword [eax], ecx
mov eax, dword [ebp - 0x2c]
add eax, 8
mov ecx, dword [ebp - 0x28]
mov dword [eax], ecx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
add eax, ecx
push eax
call fcn.00421fbb
add esp, 4
mov ecx, dword [0x42e705]
push ecx
push eax
call fcn.00421f29
add esp, 8
mov dword [0x42e705], eax
mov eax, dword [ebp - 0x1c]
add eax, 0x38
mov ecx, dword [eax]
test ecx, ecx
je 0x42243f
mov eax, dword [ebp - 0x2c]
add eax, 0x14
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x10], ecx
mov dword [eax], ecx
mov eax, dword [ebp - 0x1c]
add eax, 0x34
mov ecx, dword [ebp - 0x1c]
add ecx, 0x38
mov edx, dword [ebp - 8]
push edx
mov edx, dword [ecx]
push edx
mov ecx, 1
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov eax, dword [ebp - 0x1c]
add eax, 0x38
mov ecx, dword [ebp - 0xc]
mov edx, dword [eax]
add ecx, edx
push ecx
call fcn.00421f9b
add esp, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x2c]
add eax, 0x10
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
sub ecx, edx
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
call fcn.00421f58
add esp, 8
jmp 0x422146
mov eax, dword [ebp + 8]
add eax, 0x3c
movzx ecx, word [eax]
mov word [0x42e6bb], cx
mov eax, dword [ebp + 8]
add eax, 0x14
mov ecx, dword [eax]
mov dword [0x42e709], ecx
mov eax, dword [ebp + 8]
add eax, 0x18
mov ecx, dword [eax]
mov dword [0x42e6e9], ecx
mov eax, dword [ebp + 8]
add eax, 0x10
mov ecx, 1
mov edx, dword [eax]
cmp ecx, edx
jne 0x422496
mov eax, 0x230e
mov word [0x42e6cb], ax
jmp 0x4224b7
mov eax, dword [ebp + 8]
add eax, 0x10
mov ecx, 2
mov edx, dword [eax]
cmp ecx, edx
je 0x4224b7
mov eax, 3
mov word [0x42e711], ax
mov eax, 0
push eax
mov eax, 0
push eax
mov eax, dword [ebp - 8]
push eax
call sub.msvcrt.dll_fseek
add esp, 0xc
mov eax, dword [ebp - 8]
push eax
mov eax, 0x178
push eax
mov eax, 1
push eax
mov eax, 0x42e635
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov eax, 0
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
add eax, 0x3c
mov ecx, dword [ebp - 4]
mov edx, dword [eax]
cmp ecx, edx
jge 0x42254b
jmp 0x422518
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
jmp 0x4224f5
mov eax, dword [ebp + 8]
add eax, 0x38
mov ecx, dword [ebp - 4]
mov edx, 0x64
imul ecx, edx
mov edx, dword [eax]
add edx, ecx
add edx, 0x3c
mov eax, dword [ebp - 8]
push eax
mov eax, 0x28
push eax
mov eax, 1
push eax
push edx
call sub.msvcrt.dll_fwrite
add esp, 0x10
jmp 0x42250d
mov eax, dword [ebp - 8]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
add ecx, 0xa4
mov eax, 2
mov edx, dword [ecx]
cmp eax, edx
jne 0x42257f
mov eax, str.________________________________n
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
add ecx, 0xa4
mov eax, dword [ecx]
test eax, eax
je 0x4225af
mov eax, dword [ebp + 8]
add eax, 0xc
mov ecx, dword [ebp - 0xc]
push ecx
mov ecx, dword [eax]
push ecx
mov eax, str.____s___lu_bytes__n
push eax
call sub.msvcrt.dll_printf
add esp, 0xc
mov eax, 0
jmp 0x4225b9
leave
ret