Function at 0x40da70
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4cf9d4
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
push ebx
push esi
push edi
mov eax, dword [0x4fcb54]
xor eax, esp
push eax
lea eax, [esp + 0xd8]
mov dword fs:[0], eax
mov esi, ecx
call fcn.0040dfb0
mov ecx, esi
call fcn.0040f6a0
xor edi, edi
test al, al
jne 0x40dac2
push edi
push edi
push str.Failed_to_initialize_log_file.
call fcn.0048cf99
lea eax, [esp + 0x1c]
push eax
push esi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
call fcn.0040e0d0
test al, al
jne 0x40db1c
push str.Failed_to_find_data_marker.
lea ecx, [esp + 0x14]
call fcn.00402520
push esi
lea ecx, [esp + 0x14]
mov dword [esp + 0xe4], edi
call fcn.0040f8a0
mov dword [esp + 0xe0], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40df7c
mov ebx, dword [esp + 0x1c]
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0x24]
push edi
push ebx
push esi
call fcn.0040e250
test al, al
jne 0x40db74
push str.Failed_to_find_xml_size.
lea ecx, [esp + 0x14]
call fcn.00402520
push esi
lea ecx, [esp + 0x14]
mov dword [esp + 0xe4], 1
call fcn.0040f8a0
mov dword [esp + 0xe0], 0xffffffff
mov eax, dword [esp + 0x10]
jmp 0x40df6c
call fcn.00484590
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40db8e
push 0x80004005
call fcn.004021e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
add ebx, 0x18
lea ecx, [esp + 0x18]
push ecx
adc edi, 0
push edi
mov dword [esp + 0xe8], 2
push ebx
mov ecx, esi
mov dword [esp + 0x2c], edi
call fcn.0040e330
test al, al
jne 0x40dc31
push str.Failed_to_read_xml.
lea ecx, [esp + 0x14]
call fcn.00402520
push esi
lea ecx, [esp + 0x14]
mov byte [esp + 0xe4], 3
call fcn.0040f8a0
mov byte [esp + 0xe0], 2
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40dc0d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xe0], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40df7c
lea ecx, [esp + 0x38]
push ecx
call section..text
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x3c]
mov byte [esp + 0xe4], 4
call fcn.004028f0
lea ecx, [esp + 0x3c]
call fcn.004024c0
lea ecx, [esp + 0x38]
call fcn.00431ac0
test al, al
je 0x40df03
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x78]
push ecx
call fcn.0043e630
lea edx, [esp + 0x74]
lea eax, [esi + 0x10]
push edx
push eax
mov byte [esp + 0xe8], 5
call fcn.004018c0
test al, al
jne 0x40dcee
push str.Failed_to_load_XML.
lea ecx, [esp + 0x14]
call fcn.00402520
push esi
lea ecx, [esp + 0x14]
mov byte [esp + 0xe4], 6
call fcn.0040f8a0
lea ecx, [esp + 0x10]
call fcn.004012b0
lea ecx, [esp + 0x74]
mov byte [esp + 0xe0], 4
call fcn.0043e6d0
lea eax, [esp + 0x38]
push eax
mov byte [esp + 0xe4], 2
call fcn.004010c0
lea ecx, [esp + 0x18]
call fcn.004012b0
jmp 0x40df88
lea ecx, [esp + 0x74]
mov byte [esp + 0xe0], 4
call fcn.0043e6d0
mov edi, dword [esi + 0x60]
test edi, edi
je 0x40dd29
test edi, edi
mov eax, edi
je 0x40ddd2
mov eax, dword [eax + 8]
test eax, eax
mov edi, dword [edi]
je 0x40dd25
push eax
lea ecx, [esi + 0x110]
call fcn.004842bf
test edi, edi
jne 0x40dd06
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
movzx ecx, ax
cmp word [esi + 0x134], cx
lea eax, [esi + 0xf4]
je 0x40dd4b
push eax
mov word [eax + 0x40], cx
call fcn.004062f0
add ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
adc eax, dword [esp + 0x30]
lea edi, [esi + 0x50]
mov dword [esi + 0xc], eax
push edi
lea eax, [esi + 0x10]
mov dword [esi + 8], ebx
call fcn.00401b60
mov ebx, eax
test ebx, ebx
jne 0x40ddd7
push str.ERR_FIND_MAIN_SCRIPT_FILE
lea ecx, [esp + 0x14]
call fcn.00402520
lea edi, [esp + 0x10]
lea eax, [esp + 0x14]
mov byte [esp + 0xe0], 8
call fcn.0040f670
push esi
mov ecx, eax
mov byte [esp + 0xe4], 9
call fcn.0040f8a0
lea ecx, [esp + 0x14]
call fcn.004012b0
mov ecx, edi
call fcn.004012b0
lea ecx, [esp + 0x38]
push ecx
mov byte [esp + 0xe4], 2
call fcn.004010c0
lea ecx, [esp + 0x18]
call fcn.004012b0
jmp 0x40df88
jmp fcn.00484c83
push esi
call fcn.0040f970
push esi
call fcn.0040fb30
call fcn.0040ff00
lea ecx, [esp + 0x10]
call fcn.00402970
push ebx
mov ebx, 0x4103d0
lea ecx, [esp + 0x14]
mov edx, esi
mov byte [esp + 0xe4], 0xa
call fcn.0040e5f0
test eax, eax
je 0x40de7a
push str.ERR_READ_MAIN_SCRIPT_FILE
lea ecx, [esp + 0x18]
call fcn.00402520
lea edi, [esp + 0x14]
lea eax, [esp + 0x28]
mov byte [esp + 0xe0], 0xb
call fcn.0040f670
push esi
mov ecx, eax
mov byte [esp + 0xe4], 0xc
call fcn.0040f8a0
lea ecx, [esp + 0x28]
call fcn.004012b0
mov ecx, edi
call fcn.004012b0
lea ecx, [esp + 0x10]
call fcn.004012b0
lea edx, [esp + 0x38]
push edx
mov byte [esp + 0xe4], 2
call fcn.004010c0
lea ecx, [esp + 0x18]
call fcn.004012b0
jmp 0x40df88
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0x4dfd54
call fcn.00402520
push ecx
mov byte [esp + 0xe8], 0xd
mov ecx, esp
mov dword [esp + 0x1c], esp
push edi
call fcn.00402840
push ecx
mov byte [esp + 0xec], 0xe
lea eax, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
call fcn.00402840
push esi
mov byte [esp + 0xf0], 0xa
call fcn.0040ef60
lea ecx, [esp + 0x10]
call fcn.004012b0
lea ecx, [esp + 0x38]
push ecx
mov byte [esp + 0xe4], 2
call fcn.004010c0
lea ecx, [esp + 0x18]
call fcn.004012b0
xor eax, eax
mov ecx, dword [esp + 0xd8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Failed_to_set_xml_doc.
lea ecx, [esp + 0x18]
call fcn.00402520
push esi
lea ecx, [esp + 0x18]
mov byte [esp + 0xe4], 7
call fcn.0040f8a0
mov byte [esp + 0xe0], 4
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40df4b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x38]
push ecx
mov byte [esp + 0xe4], 2
call fcn.004010c0
mov dword [esp + 0xe0], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40df88
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0xd8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret