Function at 0x403510
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x477984
mov eax, dword fs:[0]
push eax
sub esp, 0x1bc
mov eax, dword [0x4af0a0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 4], 0
mov edx, dword [esi + 8]
xor eax, eax
mov dword [ebp - 0x164], 7
mov dword [ebp - 0x168], 0
mov word [ebp - 0x178], ax
cmp word [edx], ax
jne 0x403573
xor ecx, ecx
jmp 0x40358f
mov ecx, edx
lea edi, [ecx + 2]
jmp 0x403580
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403580
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x178]
call fcn.004099b0
cmp dword [0x4b3074], 8
jb 0x4035b3
push dword [0x4b3060]
call fcn.0043e4b8
add esp, 4
xor eax, eax
mov word [0x4b3060], ax
lea eax, [ebp - 0x178]
push eax
mov ecx, 0x4b3060
mov dword [0x4b3074], 7
mov dword [0x4b3070], 0
call fcn.00408460
cmp dword [ebp - 0x164], 8
jb 0x4035f7
push dword [ebp - 0x178]
call fcn.0043e4b8
add esp, 4
mov edx, dword [esi + 8]
xor eax, eax
mov dword [ebp - 0x74], 7
mov dword [ebp - 0x78], 0
mov word [ebp - 0x88], ax
cmp word [edx], ax
jne 0x40361a
xor ecx, ecx
jmp 0x40362f
mov ecx, edx
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403620
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x88]
call fcn.004099b0
push 1
push ecx
push 0x482e28
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 1
call fcn.004085e0
push 1
push ecx
push 0x482e2c
lea ecx, [ebp - 0x88]
mov esi, eax
call fcn.004085e0
cmp esi, 0xffffffff
jne 0x4036a8
cmp eax, esi
jne 0x4036a8
lea eax, [ebp - 0xb8]
push eax
lea ecx, [ebp - 0x1a0]
mov dword [ebp - 0xb8], str.Output_file_format_invalid.
call fcn.0043cae7
push 0x4ab250
lea eax, [ebp - 0x1a0]
push eax
mov dword [ebp - method.std::logic_error.virtual_0], vtable.std::invalid_argument.0
call fcn.00440b6b
xor ecx, ecx
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], cx
mov byte [ebp - 4], 2
cmp esi, eax
jle 0x4036e3
push esi
push ecx
lea eax, [ebp - 0x194]
push eax
lea ecx, [ebp - 0x88]
call fcn.00405f70
mov byte [ebp - 4], 3
push 0x482e28
jmp 0x403700
push eax
push ecx
lea eax, [ebp - 0x194]
push eax
lea ecx, [ebp - 0x88]
call fcn.00405f70
mov byte [ebp - 4], 4
push 0x482e2c
mov edx, eax
lea ecx, [ebp - 0x178]
call fcn.0040ad90
mov esi, eax
lea eax, [ebp - 0x40]
add esp, 4
cmp eax, esi
je 0x403743
cmp dword [ebp - 0x2c], 8
jb 0x40372a
push dword [ebp - 0x40]
call fcn.0043e4b8
add esp, 4
xor eax, eax
push esi
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], eax
mov word [ebp - 0x40], ax
call fcn.00408460
cmp dword [ebp - 0x164], 8
jb 0x40375a
push dword [ebp - 0x178]
call fcn.0043e4b8
add esp, 4
mov byte [ebp - 4], 2
xor eax, eax
cmp dword [ebp - 0x180], 8
mov word [ebp - 0x178], ax
mov dword [ebp - 0x168], eax
mov dword [ebp - 0x164], 7
jb 0x40378e
push dword [ebp - 0x194]
call fcn.0043e4b8
add esp, 4
sub esp, 0x18
mov ecx, esp
xor eax, eax
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp - 0x40]
push eax
call fcn.004084c0
lea ecx, [ebp - 0x70]
call fcn.00403330
add esp, 0x18
mov byte [ebp - 4], 5
cmp dword [ebp - 0x60], 3
jae 0x4037fe
lea eax, [ebp - 0xb8]
push eax
lea ecx, [ebp - 0x1b8]
mov dword [ebp - 0xb8], str.Output_file_path_invalid
call fcn.0043cae7
push 0x4ab250
lea eax, [ebp - 0x1b8]
push eax
mov dword [ebp - method.std::logic_error.virtual_0], vtable.std::invalid_argument.0
call fcn.00440b6b
cmp dword [ebp - 0x5c], 0x10
lea eax, [ebp - 0x70]
cmovae eax, dword [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4039e0
test al, 0x10
je 0x4039e0
lea eax, [ebp - 0x90]
push eax
call fcn.0043f2be
add esp, 4
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0xb4]
push eax
call fcn.0043d592
lea eax, [ebp - 0xb4]
push eax
push str._H__M__S
lea eax, [ebp - 0x28]
push 0x14
push eax
call fcn.0043e7ed
add esp, 0x18
lea eax, [ebp - 0x70]
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x44], 0xf
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x58], 0
call fcn.00407e90
push 0x10
push str.Tmp_BOCIPASE256_
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 6
call fcn.004090a0
cmp byte [ebp - 0x28], 0
jne 0x40389c
xor ecx, ecx
jmp 0x4038ab
lea ecx, [ebp - 0x28]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4038a2
sub ecx, edx
push ecx
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x58]
call fcn.004090a0
push 4
push str..tmp
lea ecx, [ebp - 0x58]
call fcn.004090a0
push ecx
lea ecx, [ebp - 0x160]
call fcn.00403ac0
sub esp, 0xc
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x160]
call fcn.004064e0
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x160]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x154], 6
je 0x403933
lea eax, [ebp - 0xb8]
push eax
lea ecx, [ebp - 0x1ac]
mov dword [ebp - 0xb8], str.Cannot_output_to_output_directory.
call fcn.0043cae7
push 0x4ab250
lea eax, [ebp - 0x1ac]
push eax
mov dword [ebp - method.std::logic_error.virtual_0], vtable.std::invalid_argument.0
call fcn.00440b6b
lea ecx, [ebp - 0x160]
call fcn.004068a0
cmp dword [ebp - 0x44], 0x10
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
push eax
call fcn.0043e1d0
add esp, 4
lea ecx, [ebp - 0x160]
call fcn.00403a60
cmp dword [ebp - 0x44], 0x10
jb 0x40396e
push dword [ebp - 0x58]
call fcn.0043e4b8
add esp, 4
cmp dword [ebp - 0x5c], 0x10
mov dword [ebp - 0x44], 0xf
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x58], 0
jb 0x403991
push dword [ebp - 0x70]
call fcn.0043e4b8
add esp, 4
cmp dword [ebp - 0x2c], 8
mov dword [ebp - 0x5c], 0xf
mov dword [ebp - 0x60], 0
mov byte [ebp - 0x70], 0
jb 0x4039b4
push dword [ebp - 0x40]
call fcn.0043e4b8
add esp, 4
xor eax, eax
cmp dword [ebp - 0x74], 8
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jb 0x4039dc
push dword [ebp - 0x88]
call fcn.0043e4b8
add esp, 4
mov al, 1
jmp 0x403a3f
lea eax, [ebp - 0xb8]
push eax
lea ecx, [ebp - 0x1c4]
mov dword [ebp - 0xb8], str.Output_file_path_not_exist.
call fcn.0043cae7
push 0x4ab250
lea eax, [ebp - 0x1c4]
push eax
mov dword [ebp - method.std::logic_error.virtual_0], vtable.std::invalid_argument.0
call fcn.00440b6b
mov ecx, dword [ebp - 0x17c]
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, eax
mov ecx, 0x4b35f8
call fcn.0040ade0
push eax
call fcn.004021a0
add esp, 4
mov eax, 0x403a3d
ret
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0043c933
mov esp, ebp
pop ebp
ret