Function at 0x401ab0
Capabilities:
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov ebx, ecx
mov dword [esp + 0x14], edx
push 0xc
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
test eax, eax
je 0x401ae9
mov edi, eax
push 0x40
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov dword [edi], eax
mov dword [edi + 4], 0
mov dword [edi + 8], 0x40
jmp 0x401aeb
xor edi, edi
mov ecx, dword [edi + 4]
mov ebp, dword [ebx]
mov esi, dword [ebx + 4]
mov ebx, edi
lea eax, [ecx + 9]
mov dword [esp + 0x10], ebp
cmp eax, dword [edi + 8]
jbe 0x401b41
add ecx, 0x89
mov edi, esi
mov esi, ecx
push ecx
push dword [ebx]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
test eax, eax
je 0x401b21
mov dword [ebx], eax
mov dword [ebx + 8], esi
jmp 0x401b3b
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push esi
push str.ERROR:_realloc_failed_on_size_d_n
push eax
call fcn.00401990
add esp, 0xc
mov ebp, dword [esp + 0x10]
mov esi, edi
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov dl, byte [ebp + 8]
mov dword [esp + 0xc], ebx
mov byte [eax + ecx + 8], dl
movsd xmm0, qword [ebp]
movsd qword [eax + ecx], xmm0
mov edi, dword [ebx + 4]
add edi, 9
cmp esi, 0xa
mov dword [ebx + 4], edi
jl 0x401e9e
add esi, 0xfffffff7
lea edx, [ebp + 9]
mov dword [esp + 4], 0
jmp 0x401bb3
mov dword [ebx], eax
mov dword [ebx + 8], esi
mov edx, dword [esp]
mov eax, dword [ebx]
add eax, dword [ebx + 4]
push edi
push edx
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov edx, dword [esp + 0xc]
add esp, 0xc
add edi, dword [ebx + 4]
mov dword [ebx + 4], edi
mov esi, dword [esp + 8]
lea edx, [edx + ebp + 1]
inc ebp
sub esi, ebp
jle 0x401e9e
movzx ebx, byte [edx]
mov eax, ebx
add al, 0x77
cmp al, 0x9a
ja case.0x401bcd.113
movzx eax, al
mov ebp, 4
mov dword [esp], edx
jmp dword [eax*4 + section..rdata]
mov byte [edx], 0xff
jmp case.0x401bcd.5
mov ebp, 8
jmp case.0x401bcd.5
mov ebp, 0xc
jmp case.0x401bcd.5
mov ebx, dword [esp + 0xc]
mov byte [edx], 0xff
mov dword [esp + 8], esi
mov esi, dword [ebx + 4]
lea eax, [esi + 5]
cmp eax, dword [ebx + 8]
jbe 0x401dfc
add esi, 0x85
push esi
push dword [ebx]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
test eax, eax
je 0x401de2
mov dword [ebx], eax
mov dword [ebx + 8], esi
jmp 0x401dfc
mov ebp, 0xd
mov byte [edx], 0x23
mov dword [edx + 5], 0
jmp case.0x401bcd.5
mov eax, dword [esp + 0x2c]
test al, 1
je 0x401dd0
mov eax, dword [edx + 1]
mov ebp, 8
bswap eax
cmp eax, 0x49
je 0x401c65
cmp eax, 0x5a
jne 0x401dd0
mov dword [esp + 4], 1
jmp 0x401ba6
mov ebp, 0xffffffff
cmp esi, 0x25
jl case.0x401bcd.5
mov eax, edx
movzx edx, word [edx + 0x25]
mov edi, esi
mov ebx, 0xb
lea ecx, [eax + 0x27]
lea eax, [esi - 0x27]
shl edx, 0x10
bswap edx
test edx, edx
je 0x401ccd
nop dword [eax]
movzx esi, byte [ecx + 2]
cmp esi, 0xb
ja 0x401e40
bt ebx, esi
jb 0x401e40
mov esi, dword [esi*4 + 0x40958c]
add esi, 3
sub eax, esi
js 0x401e40
add ecx, esi
dec edx
jne 0x401ca0
movzx edx, word [ecx]
add ecx, 2
add eax, 0xfffffffe
shl edx, 0x10
bswap edx
test edx, edx
je 0x401d0d
nop
movzx esi, byte [ecx + 4]
cmp esi, 0xb
ja 0x401e26
bt ebx, esi
jb 0x401e26
mov esi, dword [esi*4 + 0x40958c]
add esi, 5
sub eax, esi
js 0x401e40
add ecx, esi
dec edx
jne 0x401ce0
movzx esi, word [ecx]
add ecx, 2
shl esi, 0x10
bswap esi
test esi, esi
je 0x401d47
cmp eax, 7
mov edx, 6
cmovl edx, eax
neg edx
lea eax, [eax + edx + 4]
mov edx, 0xcccccccd
mul edx
lea eax, [esi - 1]
shr edx, 2
cmp edx, eax
jbe 0x401e40
lea eax, [esi + esi*4]
add ecx, eax
mov edx, dword [esp]
mov esi, edi
lea eax, [edx + 1]
sub ecx, eax
mov ebp, ecx
jmp case.0x401bcd.5
mov ebp, dword [edx + 0xd]
bswap ebp
add ebp, 0x10
jmp 0x401d6e
mov eax, dword [edx + 9]
bswap eax
lea ebp, [eax*4 + 0x10]
xor eax, eax
jmp 0x401db9
movzx ebx, byte [edx + 0xd]
mov dword [esp + 8], esi
movzx eax, byte [edx + 9]
movzx esi, byte [edx + 0xa]
movzx ebp, byte [edx + 0xb]
movzx ecx, byte [edx + 0xc]
mov edx, 0xffffffff
cmp ebx, 0xb
ja 0x401d9b
mov edx, dword [ebx*4 + 0x40958c]
shl esi, 0x10
shl eax, 0x18
shl ebp, 8
or eax, esi
mov esi, dword [esp + 8]
or ebp, eax
xor eax, eax
or ebp, ecx
imul ebp, edx
mov edx, dword [esp]
add ebp, 0xd
cmp dword [esp + 4], 0
setne al
mov dword [esp + 4], eax
jne 0x401ba6
jmp case.0x401bcd.5
mov dword [esp + 4], 0
mov ebp, 8
jmp 0x401ba6
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push esi
push str.ERROR:_realloc_failed_on_size_d_n
push eax
call fcn.00401990
add esp, 0xc
mov edx, dword [esp]
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov ebp, 0xc
mov dl, byte [edx + 4]
mov byte [eax + ecx + 4], dl
mov edx, dword [esp]
mov edx, dword [edx]
mov dword [eax + ecx], edx
mov edx, dword [esp]
mov edi, dword [ebx + 4]
add edi, 5
jmp 0x401b9f
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push esi
push str.ERROR:_invalid_basicType__d_n
push eax
call fcn.00401990
add esp, 0xc
mov edx, dword [esp]
mov esi, edi
nop word cs:[eax + eax]
nop
mov ebx, dword [esp + 0xc]
mov dword [esp + 8], esi
lea edi, [ebp + 1]
mov esi, dword [ebx + 4]
add esi, edi
cmp esi, dword [ebx + 8]
jbe 0x401b88
sub esi, 0xffffff80
push esi
push dword [ebx]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
test eax, eax
jne 0x401b80
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push esi
push str.ERROR:_realloc_failed_on_size_d_n
push eax
call fcn.00401990
add esp, 0xc
jmp 0x401b85
mov esi, dword [esp + 0xc]
add edi, 0xfffffff7
bswap edi
mov eax, dword [esi]
mov dword [eax + 5], edi
push dword [esp + 0x14]
push dword [esi + 4]
push 1
push dword [esi]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
cmp eax, dword [esi + 4]
jne 0x401ecf
mov dword [esi + 4], 0
xor edi, edi
jmp 0x401f23
mov edi, eax
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push dword [esi + 4]
push edi
push str.ERROR:_write__zu_of__zu_bytes_n
push eax
call fcn.00401990
add esp, 0x10
mov edi, 0xffffffff
jmp 0x401f23
push 2
mov esi, edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
sub esi, dword [esp + 0x10]
push esi
push ebx
push str.ERROR:_unexpected_subtype_0x_02x_at_offset__zu_n
push eax
call fcn.00401990
add esp, 0x10
mov esi, dword [esp + 0xc]
mov edi, 0xffffffff
test esi, esi
je 0x401f36
push dword [esi]
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, edi
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret