Function at 0x4021c0
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xac
mov edi, dword [esp + 0xd4]
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
test edi, edi
jne 0x4024d4
mov eax, dword [esp + 0xc4]
test eax, eax
jne 0x402400
mov dword [esp + 0x68], 0
mov edi, dword [esp + 0xc4]
lea eax, [esp + 0x78]
mov dword [esp + 4], 0
mov dword [esp + 0x6c], eax
mov dword [esp + 8], eax
mov eax, dword [esp + 0xc0]
mov dword [esp], eax
call fcn.004152a0
mov ebx, eax
mov eax, edx
mov ebp, edx
or eax, ebx
jne 0x4026a0
mov eax, dword [esp + 0xc8]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x78]
mov dword [esp], eax
call fcn.004153f0
mov ebx, eax
mov eax, edx
mov ebp, edx
or eax, ebx
jne 0x402924
mov ebx, dword [esp + 0xdc]
xor edx, edx
lea ecx, [esp + 0x8a]
mov esi, dword [esp + 0xcc]
mov dword [esp + 8], 0
test ebx, ebx
mov dword [esp + 0x50], 0
setne dl
test edi, edi
mov edi, dword [esp + 0xc8]
mov dword [esp + 0x48], 1
cmovne eax, ecx
mov ecx, dword [esp + 0xe0]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x44], 0
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0xd0]
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x68]
mov dword [esp + 0x18], eax
xor eax, eax
test esi, esi
setne al
mov dword [esp + 0x40], 0
mov dword [esp + 0xc], eax
xor eax, eax
test edi, edi
setne al
mov dword [esp + 0x3c], 0
mov dword [esp + 4], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x38], 0
mov dword [esp], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
call fcn.00404560
mov ebx, eax
mov eax, edx
mov ebp, edx
or eax, ebx
je 0x402760
mov ecx, dword [esp + 0xc4]
test ecx, ecx
je 0x4028f0
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.0041d490
mov dword [esp], 2
mov esi, dword [fcn.004a1b90]
mov edi, eax
call esi
mov dword [esp + 8], edi
mov dword [esp + 4], str.Formatting_failed:__s
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
mov eax, dword [esp + 0x78]
test eax, eax
je 0x402737
mov dword [esp], eax
call fcn.004155c0
mov edi, eax
mov eax, edx
or eax, edi
je 0x40271f
mov dword [esp + 4], edx
mov dword [esp], edi
call fcn.0041d490
mov dword [esp], 2
mov dword [esp + 0x68], eax
call esi
mov edx, dword [esp + 0x68]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], edx
jmp 0x402ae7
mov esi, dword [fcn.004a1b90]
mov dword [esp], 2
call esi
mov ecx, dword [esp + 0xc0]
mov dword [esp + 4], str.Device:___s_
mov dword [esp], eax
mov dword [esp + 8], ecx
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
mov dword [esp], 2
call esi
mov dword [esp + 8], 0x14
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Volume_label:__none_
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
mov dword [esp + 0x68], 0
mov dword [esp], 2
call esi
mov dword [esp + 8], 0x13
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Volume_GUID:__none_
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
jmp 0x402217
lea eax, [esp + 0x74]
lea esi, [esp + 0x70]
mov dword [esp + 4], 0xffffffff
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xd8]
mov dword [esp + 8], esi
mov dword [esp], eax
call fcn.00428150
mov ebx, eax
mov eax, edx
mov ebp, edx
or eax, ebx
jne 0x4029c0
mov eax, dword [esp + 0x74]
mov dword [esp + 0x68], eax
cmp eax, 0xb
ja 0x402800
lea edi, [esp + 0x8e]
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x8a], 0
lea ebp, [esp + 0x8a]
mov ecx, edi
mov dword [esp + 0x9c], 0
and ecx, 0xfffffffc
mov edx, ebp
sub edx, ecx
add edx, 0x16
and edx, 0xfffffffc
mov dword [ecx + eax], ebx
add eax, 4
cmp eax, edx
jb 0x402551
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x70]
add eax, eax
cmp eax, 4
jae 0x402a80
test eax, eax
jne 0x402b40
mov eax, dword [esp + 0x68]
mov dword [esp], ebp
mov dword [esp + 4], eax
call fcn.0040d980
test eax, eax
je 0x402b60
mov eax, dword [esp + 0x70]
test eax, eax
je 0x4025aa
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0041d440
mov dword [esp + 0x74], 0
mov edx, dword [esp + 0xc4]
test edx, edx
je 0x402b94
mov esi, dword [fcn.004a1b90]
mov dword [esp], 2
lea edi, [esp + 0x80]
call esi
mov ecx, dword [esp + 0xc0]
mov dword [esp + 4], str.Device:___s_
mov dword [esp], eax
mov dword [esp + 8], ecx
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
lea eax, [esp + 0x84]
mov dword [esp], ebp
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp + 0x80], 0
call fcn.00428940
mov ebx, eax
mov eax, edx
mov ebp, edx
or eax, ebx
jne 0x402960
mov ebp, dword [esp + 0x80]
mov ebx, dword [esp + 0x84]
mov dword [esp], 2
call esi
mov dword [esp + 4], str.Volume_Label:___.s_
mov dword [esp + 0xc], ebp
mov dword [esp + 8], ebx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
mov eax, dword [esp + 0x80]
mov dword [esp + 4], edi
mov edi, 1
mov dword [esp], eax
call fcn.0041d440
jmp 0x40248d
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.0041d490
mov dword [esp], 2
mov esi, dword [fcn.004a1b90]
mov edi, eax
call esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x4a33f7
mov dword [esp + 4], str.__s__Failed_to_create_exfat_device:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a342d
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, dword [esp + 0x78]
test eax, eax
je 0x402737
mov eax, dword [esp + 0x6c]
mov dword [esp], eax
call fcn.004152d0
mov edi, eax
mov eax, edx
or eax, edi
jne 0x402870
mov eax, dword [esp + 0x70]
test eax, eax
je 0x40274f
lea edx, [esp + 0x70]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0041d440
add esp, 0xac
mov eax, ebx
mov edx, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x78]
lea esi, [esp + 0x7c]
mov dword [esp + 4], 0
mov dword [esp + 8], esi
mov dword [esp], eax
call fcn.004105b0
mov ebx, eax
mov eax, edx
mov ebp, edx
or eax, ebx
jne 0x4029f1
mov eax, dword [esp + 0x7c]
mov dword [esp], eax
call fcn.004127d0
mov dword [esp], esi
call fcn.00412cb0
mov eax, dword [esp + 0x78]
test eax, eax
je 0x402737
mov dword [esp], eax
call fcn.004155c0
mov ebx, eax
mov eax, edx
mov ebp, edx
or eax, ebx
jne 0x402ac2
mov eax, dword [esp + 0x6c]
mov dword [esp], eax
call fcn.004152d0
mov ebx, eax
mov eax, edx
mov ebp, edx
or eax, ebx
je 0x402737
mov dword [esp], ebx
mov dword [esp + 4], ebp
call fcn.0041d490
mov dword [esp], 2
mov esi, dword [fcn.004a1b90]
mov edi, eax
call esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebx
jmp 0x402895
mov dword [esp], 2
mov esi, dword [fcn.004a1b90]
call esi
mov ecx, dword [esp + 0x68]
mov dword [esp + 0xc], 0xb
mov dword [esp + 4], str.Error:_Invalid_volume_label_length.__Was:__Iu_Maximum_length_allowed:__Iu_
mov dword [esp + 8], ecx
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
mov ebx, 0x16
xor ebp, ebp
call esi
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
mov eax, dword [esp + 0x78]
test eax, eax
je 0x402737
lea eax, [esp + 0x78]
mov dword [esp + 0x6c], eax
jmp 0x40271f
mov dword [esp + 4], edx
mov dword [esp], edi
call fcn.0041d490
mov dword [esp], 2
mov dword [esp + 0x68], eax
call esi
mov edx, dword [esp + 0x68]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], edx
mov dword [esp + 8], 0x4a33f7
mov dword [esp + 4], 0x4a34cc
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a342d
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
jmp 0x402737
mov dword [esp], 2
mov esi, dword [fcn.004a1b90]
call esi
mov dword [esp + 8], 0x12
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Formatting_failed_
call sub.msvcrt.dll_fwrite
jmp 0x40239b
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.0041d490
mov dword [esp], 2
mov esi, dword [fcn.004a1b90]
mov edi, eax
call esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x4a33f7
mov dword [esp + 4], str.__s__Failed_to_open_exfat_device:__lu___s_
jmp 0x4026d5
mov dword [esp], ebx
mov dword [esp + 4], ebp
call fcn.0041d490
mov dword [esp], 2
mov edi, eax
call esi
mov dword [esp + 8], edi
mov dword [esp + 4], str.Error_while_decoding_volume_label:__s
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
lea eax, [esp + 0x78]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x78]
test eax, eax
jne 0x40271f
jmp 0x402737
mov dword [esp], 2
mov esi, dword [fcn.004a1b90]
call esi
mov dword [esp + 8], 0x31
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Error:_Failed_to_encode_volume_label_into_UTF_16.
call sub.msvcrt.dll_fwrite
jmp 0x40298b
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.0041d490
mov esi, dword [fcn.004a1b90]
mov dword [esp], 2
mov edi, eax
call esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x4a33f7
mov dword [esp + 4], str.__s__Generated_invalid_volume._exfat_volume_create_returned:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a342d
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, dword [esp + 0x78]
test eax, eax
jne 0x4023c0
jmp 0x402737
mov ecx, dword [edx]
and edi, 0xfffffffc
mov dword [esp + 0x8a], ecx
mov ecx, dword [edx + eax - 4]
mov dword [esp + eax + 0x86], ecx
mov ecx, ebp
sub ecx, edi
add eax, ecx
sub edx, ecx
and eax, 0xfffffffc
cmp eax, 4
jb 0x402576
and eax, 0xfffffffc
xor ecx, ecx
mov ebx, dword [edx + ecx]
mov dword [edi + ecx], ebx
add ecx, 4
cmp ecx, eax
jb 0x402ab0
jmp 0x402576
mov dword [esp], ebx
mov dword [esp + 4], ebp
call fcn.0041d490
mov dword [esp], 2
mov esi, dword [fcn.004a1b90]
mov edi, eax
call esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x4a33f7
mov dword [esp + 4], 0x4a3518
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a342d
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov dword [esp], eax
call sub.msvcrt.dll_fflush
jmp 0x40271f
movzx ecx, byte [edx]
mov byte [ebp], cl
test al, 2
je 0x402576
movzx edx, word [edx + eax - 2]
mov word [ebp + eax - 2], dx
jmp 0x402576
mov dword [esp], 2
mov esi, dword [fcn.004a1b90]
call esi
mov dword [esp + 8], 0x2a
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Error:_Invalid_characters_in_volume_label.
call sub.msvcrt.dll_fwrite
jmp 0x40282f
mov edi, 1
jmp 0x402217