Function at 0x401b00
Capabilities:
Terminate process
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov dword [esp + 0x1c], edx
mov ebp, ecx
push 0xc
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov esi, eax
test eax, eax
je 0x401b3b
push 0x40
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov ecx, eax
mov dword [esi], eax
mov dword [esi + 4], 0
mov dword [esi + 8], 0x40
jmp 0x401b3b
mov edi, esi
mov edx, dword [ebp]
mov esi, dword [ebp + 4]
movzx eax, byte [edx + 8]
mov byte [ecx + 8], al
movsd xmm0, qword [edx]
movsd qword [ecx], xmm0
mov ebx, dword [edi + 4]
add ebx, 9
mov dword [edi + 4], ebx
mov dword [esp + 0x14], esi
cmp esi, 0xa
mov dword [esp + 4], edi
jl 0x401f01
mov esi, edi
add dword [esp + 0x14], 0xfffffff7
mov dword [esp + 0x18], edx
lea eax, [edx + 9]
mov dword [esp], eax
mov dword [esp + 0xc], 0
jmp 0x401bc8
mov edi, esi
lea eax, [edx + 1]
add ebx, ecx
push eax
push dword [esp + 4]
push ebx
mov ebx, ecx
mov esi, edx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov edx, esi
mov ecx, ebx
add esp, 0xc
mov dword [edi + 4], ebp
mov ebx, ebp
mov esi, edi
mov eax, dword [esp]
add eax, edx
inc eax
mov dword [esp], eax
inc edx
sub dword [esp + 0x14], edx
jle 0x401f01
mov eax, dword [esp]
movzx ebp, byte [eax]
mov edx, 4
lea eax, [ebp - 1]
cmp eax, 0xc2
ja case.default.0x401bdd
jmp dword [eax*4 + section..rdata]
mov eax, dword [esp]
mov byte [eax], 0xff
jmp case.0x401bdd.5
mov edx, 8
jmp case.0x401bdd.5
mov edx, 0xc
jmp case.0x401bdd.5
cmp ebp, 0xfe
je 0x401e4b
cmp ebp, 0xff
je case.0x401bdd.5
jmp case.0x401bdd.9
mov edx, 0xffffffff
cmp dword [esp + 0x14], 0x25
jb case.0x401bdd.5
mov dword [esp + 8], ebx
mov dword [esp + 0x10], ecx
mov eax, dword [esp]
movzx edx, word [eax + 0x25]
rol dx, 8
lea ecx, [eax + 0x27]
mov eax, dword [esp + 0x14]
add eax, 0xffffffd9
test dx, dx
je 0x401c92
movzx edx, dx
nop word cs:[eax + eax]
movzx ebx, byte [ecx + 2]
cmp ebx, 0xb
ja 0x401ea6
mov ebp, 0xb
bt ebp, ebx
jb 0x401ea6
mov ebx, dword [ebx*4 + 0x409628]
add ebx, 3
sub eax, ebx
js 0x401ea6
add ecx, ebx
dec edx
jne 0x401c60
movzx edx, word [ecx]
rol dx, 8
add ecx, 2
add eax, 0xfffffffe
test dx, dx
je 0x401ce2
movzx edx, dx
nop word [eax + eax]
movzx ebx, byte [ecx + 4]
cmp ebx, 0xb
ja 0x401e8c
mov ebp, 0xb
bt ebp, ebx
jb 0x401e8c
mov ebx, dword [ebx*4 + 0x409628]
add ebx, 5
sub eax, ebx
js 0x401ea6
add ecx, ebx
dec edx
jne 0x401cb0
movzx edx, word [ecx]
rol dx, 8
add ecx, 2
test dx, dx
je 0x401d20
movzx ebx, dx
cmp eax, 6
mov edx, 6
cmovl edx, eax
neg edx
add eax, edx
add eax, 4
mov edx, 0xcccccccd
mul edx
shr edx, 2
lea eax, [ebx - 1]
cmp edx, eax
jbe 0x401ea6
lea eax, [ebx + ebx*4]
add ecx, eax
mov esi, dword [esp + 4]
mov ebx, dword [esp + 8]
mov eax, dword [esp]
inc eax
sub ecx, eax
mov edx, ecx
mov ecx, dword [esp + 0x10]
jmp case.0x401bdd.5
mov edi, esi
mov eax, dword [esp]
mov esi, dword [eax + 0xd]
bswap esi
add esi, 0x10
jmp 0x401d59
mov eax, dword [esp]
mov eax, dword [eax + 9]
bswap eax
mov edi, esi
lea esi, [eax*4 + 0x10]
cmp dword [esp + 0xc], 0
setne al
mov edx, 0
mov dl, al
mov dword [esp + 0xc], edx
mov edx, esi
mov esi, edi
jne 0x401bb4
jmp case.0x401bdd.5
mov dword [esp + 8], ebx
mov ebp, ecx
mov eax, dword [esp]
movzx ecx, byte [eax + 0xd]
mov eax, 0xffffffff
cmp ecx, 0xb
ja 0x401d99
mov eax, dword [ecx*4 + 0x409628]
mov edi, dword [esp]
movzx ecx, byte [edi + 9]
movzx edx, byte [edi + 0xa]
movzx esi, byte [edi + 0xb]
movzx ebx, byte [edi + 0xc]
shl edx, 0x10
shl ecx, 0x18
or ecx, edx
mov edx, esi
shl edx, 8
or edx, ecx
or edx, ebx
imul edx, eax
add edx, 0xd
cmp dword [esp + 0xc], 0
setne al
mov ecx, 0
mov cl, al
mov dword [esp + 0xc], ecx
mov esi, dword [esp + 4]
mov ecx, ebp
mov ebx, dword [esp + 8]
jne 0x401bb4
jmp case.0x401bdd.5
mov eax, dword [esp]
mov byte [eax], 0xff
lea ebp, [ebx + 5]
cmp ebp, dword [esi + 8]
jbe 0x401e18
lea edi, [ebx + 0x85]
push edi
push ecx
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
test eax, eax
je 0x401fc9
mov ecx, eax
mov dword [esi], eax
mov dword [esi + 8], edi
mov edx, dword [esp]
movzx eax, byte [edx + 4]
mov byte [ecx + ebx + 4], al
mov eax, dword [edx]
mov dword [ecx + ebx], eax
mov dword [esi + 4], ebp
mov edx, 0xc
mov ebx, ebp
jmp 0x401bb4
mov eax, dword [esp]
mov byte [eax], 0x23
mov dword [eax + 5], 0
mov edx, 0xd
jmp case.0x401bdd.5
mov eax, dword [esp + 0x34]
test al, 1
je 0x401e7a
mov eax, dword [esp]
mov eax, dword [eax + 1]
bswap eax
mov dword [esp + 0xc], 1
mov edx, 8
cmp eax, 0x49
je 0x401bb4
cmp eax, 0x5a
je 0x401bb4
mov dword [esp + 0xc], 0
mov edx, 8
jmp 0x401bb4
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push ebx
push str.ERROR:_invalid_basicType__d_n
push eax
call fcn.004019d0
add esp, 0xc
mov esi, dword [esp + 4]
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 8]
mov edx, 0xffffffff
nop word [eax + eax]
lea ebp, [ebx + edx]
inc ebp
cmp ebp, dword [esi + 8]
jbe 0x401b90
mov dword [esp + 8], edx
mov esi, ebx
lea ebx, [ebp + 0x80]
push ebx
push ecx
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
test eax, eax
je 0x401fa8
mov ecx, eax
mov edi, dword [esp + 4]
mov dword [edi], eax
mov dword [edi + 8], ebx
mov ebx, esi
mov edx, dword [esp + 8]
jmp 0x401b92
lea eax, [ebx - 9]
bswap eax
mov dword [ecx + 5], eax
push dword [esp + 0x1c]
push ebx
push 1
mov edi, ecx
push ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
mov esi, ebx
cmp eax, ebx
jne 0x401f30
mov esi, dword [esp + 4]
mov dword [esi + 4], 0
xor ebx, ebx
jmp 0x401f56
mov ebx, eax
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push esi
push ebx
push str.ERROR:_write__zu_of__zu_bytes_n
push eax
call fcn.004019d0
add esp, 0x10
mov ebx, 0xffffffff
mov esi, dword [esp + 4]
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
mov eax, ebx
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov ecx, dword [esp]
sub ecx, dword [esp + 0x18]
push ecx
push ebp
push str.ERROR:_unexpected_subtype_0x_02x_at_offset__zu_n
push eax
call fcn.004019d0
add esp, 0x10
test esi, esi
je 0x401fa1
mov edi, dword [esi]
mov ebx, 0xffffffff
jmp 0x401f56
mov ebx, 0xffffffff
jmp 0x401f68
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push ebx
push str.ERROR:_realloc_failed_on_size_d_n
push eax
call fcn.004019d0
add esp, 0xc
push 1
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push edi
jmp 0x401fb4