Function at 0x30023e0c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x484
lea eax, [ebp - 0x430]
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x430]
mov dword [ebp - 0x24], ecx
push 0
push 4
lea edx, [ebp - 0x46c]
push edx
push 0x14
mov eax, dword [ebp + 8]
push eax
call dword [0x30032134]
mov dword [ebp - 0x480], eax
cmp dword [ebp - 0x480], 0
jge 0x30023e54
xor eax, eax
jmp 0x3002421b
mov ecx, dword [ebp - 0x46c]
shl ecx, 5
push ecx
call fcn.30020121
mov dword [ebp - 0x47c], eax
cmp dword [ebp - 0x47c], 0
jne 0x30023e79
xor eax, eax
jmp 0x3002421b
mov dword [ebp - 0x2c], 0
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x47c]
mov dword [ebp - 0x478], edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x90]
mov dword [ebp - 0x474], ecx
mov edx, dword [ebp - 0x2c]
cmp edx, dword [ebp - 0x46c]
jae 0x30024138
cmp dword [ebp - 4], 0x1000000
jae 0x30024138
push 2
push 0
push 0
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.DLL_DuplicateHandle]
test eax, eax
jne 0x30023eec
mov eax, dword [ebp - 4]
add eax, 4
mov dword [ebp - 4], eax
jmp 0x30023ea2
mov ecx, dword [ebp - 0x2c]
add ecx, 1
mov dword [ebp - 0x2c], ecx
push 0
push 0x38
lea edx, [ebp - 0x468]
push edx
push 0
mov eax, dword [ebp - 0x28]
push eax
call dword [0x3003212c]
test eax, eax
jl 0x30024120
push 0
push 0x400
mov ecx, dword [ebp - 0x18]
push ecx
push 2
mov edx, dword [ebp - 0x28]
push edx
call dword [0x3003212c]
test eax, eax
jge 0x30023f34
jmp 0x30024120
mov eax, dword [ebp - 0x18]
movzx ecx, word [eax]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
shr edx, 1
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 4]
mov word [ecx + edx*2], 0
mov edx, dword [ebp - 0x478]
mov eax, dword [ebp - 0x474]
mov dword [edx + 8], eax
push 0
lea ecx, [ebp - 0x20]
push ecx
push 4
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x30024203
cmp dword [ebp - 0x20], 4
je 0x30023f86
jmp 0x30024203
mov ecx, dword [ebp - 0x1c]
add ecx, 2
mov dword [ebp - 0x1c], ecx
push 0
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 4]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x30024203
mov ecx, dword [ebp - 0x20]
cmp ecx, dword [ebp - 0x1c]
je 0x30023fbf
jmp 0x30024203
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x474]
lea ecx, [eax + edx + 4]
mov dword [ebp - 0x474], ecx
push 0x30001eac
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpW]
test eax, eax
je 0x300240b8
push 0
push 0x400
mov ecx, dword [ebp - 0x24]
push ecx
push 1
mov edx, dword [ebp - 0x28]
push edx
call dword [0x3003212c]
test eax, eax
jl 0x300240b8
mov eax, dword [ebp - 0x24]
cmp dword [eax + 4], 0
je 0x300240b8
mov ecx, dword [ebp - 0x24]
movzx edx, word [ecx]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
shr eax, 1
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + 4]
mov word [edx + eax*2], 0
mov eax, dword [ebp - 0x478]
mov ecx, dword [ebp - 0x474]
mov dword [eax + 0xc], ecx
push 0
lea edx, [ebp - 0x20]
push edx
push 4
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x30024203
cmp dword [ebp - 0x20], 4
je 0x3002406a
jmp 0x30024203
mov edx, dword [ebp - 0x1c]
add edx, 2
mov dword [ebp - 0x1c], edx
push 0
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x30024203
mov edx, dword [ebp - 0x20]
cmp edx, dword [ebp - 0x1c]
je 0x300240a3
jmp 0x30024203
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x474]
lea edx, [ecx + eax + 4]
mov dword [ebp - 0x474], edx
jmp 0x300240c5
mov eax, dword [ebp - 0x478]
mov dword [eax + 0xc], 0
mov ecx, dword [ebp - 4]
xor edx, edx
mov eax, dword [ebp - 0x478]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x478]
mov edx, dword [ebp - 0x468]
mov dword [ecx + 0x10], edx
mov eax, dword [ebp - 0x478]
mov ecx, dword [ebp - 0x464]
mov dword [eax + 0x14], ecx
mov edx, dword [ebp - 0x478]
mov eax, dword [ebp - 0x460]
mov dword [edx + 0x18], eax
mov ecx, dword [ebp - 0x478]
mov edx, dword [ebp - 0x45c]
mov dword [ecx + 0x1c], edx
mov eax, dword [ebp - 0x478]
add eax, 0x20
mov dword [ebp - 0x478], eax
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edx, dword [ebp - 4]
add edx, 4
mov dword [ebp - 4], edx
jmp 0x30023ea2
mov dword [ebp - 0x14], 0x10
mov dword [ebp - 0x10], 0x20
mov eax, dword [ebp - 0x478]
sub eax, dword [ebp - 0x47c]
sar eax, 5
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x474]
mov dword [ecx + 0x90], edx
mov eax, dword [ebp - 0xc]
shl eax, 5
add eax, 0x10
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 0x94], eax
push 0
lea edx, [ebp - 0x20]
push edx
push 0x10
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x300241d9
cmp dword [ebp - 0x20], 0x10
jne 0x300241d9
push 0
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 0xc]
shl eax, 5
push eax
mov ecx, dword [ebp - 0x47c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x300241d9
mov eax, dword [ebp - 0xc]
shl eax, 5
cmp dword [ebp - 0x20], eax
jne 0x300241d9
mov dword [ebp - 0x484], 1
jmp 0x300241e3
mov dword [ebp - 0x484], 0
mov ecx, dword [ebp - 0x484]
mov dword [ebp - 0x470], ecx
mov edx, dword [ebp - 0x47c]
push edx
call fcn.3002013b
mov eax, dword [ebp - 0x470]
jmp 0x3002421b
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ecx, dword [ebp - 0x47c]
push ecx
call fcn.3002013b
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc