Function at 0x403220
Capabilities:
Create directory
Write file on windows

Disassembly:
sub esp, 0x434
mov eax, dword [0x5b0c20]
xor eax, esp
mov dword [esp + 0x430], eax
mov eax, dword [esp + 0x43c]
push ebx
xor ebx, ebx
push ebp
push esi
mov esi, dword [esp + 0x444]
mov dword [esp + 0x24], eax
lea eax, [ecx + 0x184]
lea edx, [esp + 0x234]
push edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], ebx
sub edx, eax
jmp 0x403270
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x403270
xor eax, eax
jmp 0x403290
movzx ecx, word [esp + eax + 0x238]
mov word [esp + eax + 0x30], cx
add eax, 2
cmp cx, bx
jne 0x403290
mov eax, esi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4032a7
lea edi, [esp + 0x30]
sub eax, esi
add edi, 0xfffffffe
jmp 0x4032c0
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x4032c0
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push ebx
push ebx
push 3
push ebx
mov ecx, eax
and ecx, 3
push 7
rep movsb byte es:[edi], byte [esi]
push closesocket
lea ecx, [esp + 0x48]
push ecx
call ebp
mov esi, eax
cmp esi, 0xffffffff
je 0x403628
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x18]
push eax
push esi
call fcn.004030e0
add esp, 0xc
push esi
test eax, eax
jne 0x403321
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4035fa
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
lea ecx, [esp + 0x20]
push ecx
push 0x20
push str.j:Y
push esi
push ebx
push esi
push edi
call fcn.00403180
add esp, 0x1c
test eax, eax
je 0x4035fa
mov ebx, dword [esp + 0x20]
lea edx, [esp + 0x18]
push edx
push 0x20
push str.j:Y
push esi
lea eax, [ebx + 0x40000]
push eax
push esi
push edi
call fcn.00403180
add esp, 0x1c
test eax, eax
jne 0x403379
xor edi, edi
jmp 0x40337d
mov edi, dword [esp + 0x18]
lea ecx, [esp + 0x30]
push 0x104
push ecx
call fcn.00441830
lea edx, [esp + 0x38]
push 0
push edx
call fcn.005260d0
add esp, 0x10
test eax, eax
je 0x4033b4
push 0
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4035fa
lea eax, [esp + 0x30]
add eax, 0xfffffffe
jmp 0x4033c0
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x4033c0
mov ecx, dword [str._rescue.rsc]
mov edx, dword [0x550b64]
mov dword [eax], ecx
mov ecx, dword [0x550b68]
push 0
mov dword [eax + 4], edx
mov edx, dword [0x550b6c]
push 0
mov dword [eax + 8], ecx
mov ecx, dword [0x550b70]
push 3
mov dword [eax + 0xc], edx
mov edx, dword [0x550b74]
push 0
mov dword [eax + 0x10], ecx
push 7
mov dword [eax + 0x14], edx
push closesocket
lea eax, [esp + 0x48]
push eax
call ebp
mov esi, eax
cmp esi, 0xffffffff
je 0x4035fa
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x14]
push edx
push esi
call fcn.004030e0
add esp, 0xc
push esi
test eax, eax
jne 0x403445
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4035fa
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x18]
cmp esi, 0x40000
jb 0x403460
mov esi, 0x40000
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push esi
push eax
add ebx, ecx
push ebx
call fcn.005257e0
mov ebx, dword [esp + 0x20]
add esp, 0xc
test edi, edi
jbe 0x40348e
mov edx, dword [esp + 0x10]
push esi
push edx
add edi, ebx
push edi
call fcn.005257e0
add esp, 0xc
mov ecx, dword [str.This_is_MBR_STRUCT_signature]
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x20]
push 0x20
push ecx
push eax
push 0
push eax
push ebx
call fcn.00403180
add esp, 0x1c
test eax, eax
je 0x40355b
lea edx, [esp + 0x30]
push 0x104
push edx
call fcn.00441830
lea edi, [esp + 0x38]
add esp, 8
add edi, 0xfffffffe
mov edi, edi
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4034d0
push 0
push 0
push 3
push 0
push 7
push closesocket
lea eax, [esp + 0x48]
mov ecx, 7
mov esi, str._bcve_mbr.bin
push eax
rep movsd dword es:[edi], dword [esi]
call ebp
mov esi, eax
cmp esi, 0xffffffff
je 0x40355b
cmp dword [esp + 0x10], 0
je 0x403519
lea ecx, [esp + 0x10]
push ecx
call fcn.00403160
add esp, 4
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x14]
push eax
push esi
call fcn.004030e0
add esp, 0xc
push esi
test eax, eax
jne 0x40353c
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4035fa
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
push ecx
push edx
add eax, ebx
push eax
call fcn.005257e0
add esp, 0xc
lea ecx, [esp + 0x30]
push 0x104
push ecx
call fcn.00441830
mov eax, dword [esp + 0x30]
add esp, 8
mov esi, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403573
lea edi, [esp + 0x30]
sub eax, esi
add edi, 0xfffffffe
jmp 0x403590
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x403590
mov ecx, eax
shr ecx, 2
push 0
rep movsd dword es:[edi], dword [esi]
push 0
push 2
push 0
push 7
mov ecx, eax
push 0x40000000
lea edx, [esp + 0x48]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call ebp
mov esi, eax
cmp esi, 0xffffffff
je 0x4035fa
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x30]
push eax
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
test eax, eax
jne 0x4035ec
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4035fa
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x24], 1
cmp dword [esp + 0x14], 0
je 0x40360e
lea eax, [esp + 0x14]
push eax
call fcn.00403160
add esp, 4
cmp dword [esp + 0x10], 0
je 0x403622
lea ecx, [esp + 0x10]
push ecx
call fcn.00403160
add esp, 4
mov eax, dword [esp + 0x24]
jmp 0x40362a
mov eax, ebx
mov ecx, dword [esp + 0x440]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00524d83
add esp, 0x434
ret 8