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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x16c
push ebx
xor ebx, ebx
mov dword [esp + 0x7c], ebx
mov eax, dword [0x6af2ec]
push esi
push edi
cmp dword [eax + 8], ebx
jne 0x52de49
lea ecx, [esp + 0x80]
push str.EPOCROOT
push ecx
call fcn.004b1400
mov edx, dword [eax]
mov eax, dword [edx + 0xc]
push 0xffffffffffffffff
push eax
lea eax, [esp + 0x6c]
push eax
call fcn.004b9950
add esp, 0x14
push eax
mov ecx, 0x6af2ec
call fcn.004b7f40
mov ecx, dword [esp + 0x5c]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x52d38f
mov eax, dword [esp + 0x5c]
push eax
call fcn.004b7f30
add esp, 4
mov ecx, dword [esp + 0x80]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x52d3af
mov eax, dword [esp + 0x80]
push eax
call fcn.004be5e0
add esp, 4
push 0xffffffffffffffff
push str.EPOCROOT_environment_variable
call fcn.004b81f0
lea ecx, [esp + 0xcc]
mov esi, eax
push ecx
mov dword [esp + 0xd0], esi
call fcn.0052d000
add esp, 0xc
mov edx, esi
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x52d3e8
push esi
call fcn.004b7f30
add esp, 4
mov ecx, dword [0x6af2ec]
cmp dword [ecx + 8], ebx
jne 0x52de24
lea esi, [esp + 0x20]
call fcn.0052cfb0
mov edx, dword [esp + 0x20]
cmp dword [edx + 8], ebx
je 0x52de0a
lea eax, [esp + 0x98]
push eax
mov ecx, esi
mov dword [esp + 0x9c], str._devices.xml
call fcn.004b92c0
mov ecx, esi
push ecx
lea ecx, [esp + 0xb0]
call fcn.00504ff0
push ecx
mov eax, esp
lea ecx, [esp + 0xb0]
mov dword [eax], 1
call fcn.005046c0
test al, al
je 0x52dd95
lea edx, [esp + 0x68]
push str.EPOCDEVICE
push edx
call fcn.004b1400
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.004b9950
mov edx, dword [esp + 0x7c]
add esp, 0x14
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x52d491
mov ecx, dword [esp + 0x68]
push ecx
call fcn.004be5e0
add esp, 4
lea edx, [esp + 0xac]
push edx
lea ecx, [esp + 0x10]
mov byte [esp + 0x17], bl
call fcn.004d8bc0
lea ecx, [esp + 0xc]
call fcn.004d0fb0
test al, al
jne 0x52dc4b
lea ecx, [esp + 0xc]
call fcn.004d8c60
lea ecx, [esp + 0xc]
call fcn.004d1000
cmp eax, 4
jne 0x52d506
lea eax, [esp + 0x130]
push eax
lea ecx, [esp + 0x10]
or ebx, 1
mov dword [esp + 0x8c], str.devices
call fcn.004d1d10
push eax
lea ecx, [esp + 0x8c]
push ecx
call fcn.004b87a0
add esp, 8
test al, al
je 0x52d506
mov al, 1
jmp 0x52d508
xor al, al
test bl, 1
je 0x52d510
and ebx, 0xfffffffe
test al, al
je 0x52dc3a
lea edx, [esp + 0x94]
push edx
lea eax, [esp + 0x11c]
push eax
lea ecx, [esp + 0x5c]
push ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0xd8], 0x5efaec
mov dword [esp + 0xa0], 0x5ed1c0
call fcn.004d5810
mov ecx, eax
call fcn.004d0aa0
push eax
lea edx, [esp + 0xd0]
push edx
call fcn.004b87a0
mov byte [esp + 0x1a], al
mov eax, dword [esp + 0x5c]
add esp, 8
test eax, eax
je 0x52d587
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x52d587
mov edx, dword [esp + 0x54]
push edx
lea ecx, [esp + 0x58]
call fcn.004d1ff0
cmp byte [esp + 0x12], 0
je 0x52dbff
lea ecx, [esp + 0xc]
call fcn.004d1000
cmp eax, 5
jne 0x52d5d4
lea eax, [esp + 0x148]
push eax
lea ecx, [esp + 0x10]
or ebx, 2
mov dword [esp + 0xa0], str.devices
call fcn.004d1d10
push eax
lea ecx, [esp + 0xa0]
push ecx
call fcn.004b87a0
add esp, 8
test al, al
jne 0x52d5e5
lea ecx, [esp + 0xc]
call fcn.004d0fb0
test al, al
jne 0x52d5e5
mov al, 1
jmp 0x52d5e7
xor al, al
test bl, 2
je 0x52d5ef
and ebx, 0xfffffffd
test al, al
je 0x52dc3a
lea ecx, [esp + 0xc]
call fcn.004d8c60
lea ecx, [esp + 0xc]
call fcn.004d1000
cmp eax, 4
jne 0x52d645
lea edx, [esp + 0x100]
push edx
lea ecx, [esp + 0x10]
or ebx, eax
mov dword [esp + 0xd8], str.device
call fcn.004d1d10
push eax
lea eax, [esp + 0xd8]
push eax
call fcn.004b87a0
add esp, 8
test al, al
je 0x52d645
mov al, 1
jmp 0x52d647
xor al, al
test bl, 4
je 0x52d64f
and ebx, 0xfffffffb
test al, al
je 0x52d592
lea ecx, [esp + 0xa8]
push ecx
lea edx, [esp + 0x164]
push edx
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0xe8], 0x5efa18
mov dword [esp + 0xb4], 0x646960
call fcn.004d5810
mov ecx, eax
call fcn.004d0aa0
push eax
lea ecx, [esp + 0xe0]
push ecx
call fcn.004b87a0
mov byte [esp + 0x27], al
mov eax, dword [esp + 0x38]
add esp, 8
test eax, eax
je 0x52d6c6
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x52d6c6
mov eax, dword [esp + 0x30]
push eax
lea ecx, [esp + 0x34]
call fcn.004d1ff0
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0xb8]
push edx
lea eax, [esp + 0x114]
push eax
lea ecx, [esp + 0x5c]
push ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0xc4], 0x64695c
call fcn.004d5810
mov ecx, eax
call fcn.004d0aa0
mov ecx, eax
call fcn.004ba830
mov eax, dword [esp + 0x50]
test eax, eax
je 0x52d721
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x52d721
mov eax, dword [esp + 0x50]
push eax
lea ecx, [esp + 0x54]
call fcn.004d1ff0
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0xe8]
push edx
lea eax, [esp + 0x12c]
push eax
lea ecx, [esp + 0x64]
push ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0xf4], 0x646954
call fcn.004d5810
mov ecx, eax
call fcn.004d0aa0
mov ecx, eax
call fcn.004ba830
mov eax, dword [esp + 0x58]
test eax, eax
je 0x52d77c
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x52d77c
mov eax, dword [esp + 0x58]
push eax
lea ecx, [esp + 0x5c]
call fcn.004d1ff0
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0xd4]
push edx
lea eax, [esp + 0x144]
push eax
lea ecx, [esp + 0x48]
push ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0xe0], str.alias
call fcn.004d5810
mov ecx, eax
call fcn.004d0aa0
mov ecx, eax
call fcn.004ba830
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x52d7d7
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x52d7d7
mov eax, dword [esp + 0x3c]
push eax
lea ecx, [esp + 0x40]
call fcn.004d1ff0
lea ecx, [esp + 0x40]
mov dword [esp + 0xe8], ecx
lea edx, [esp + 0xc0]
mov dword [esp + 0xec], edx
lea ecx, [esp + 0x38]
lea edx, [esp + 0x44]
lea eax, [esp + 0xe8]
mov dword [esp + 0xf4], ecx
push edx
lea ecx, [esp + 0xf4]
mov dword [esp + 0xc4], 0x681e64
mov dword [esp + 0xf4], eax
call fcn.0052d280
mov eax, dword [esp + 0x44]
mov dword [esp + 0x4c], eax
mov ecx, 1
lock xadd dword [eax], ecx
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x50]
call fcn.004b7fa0
mov byte [esp + 0x12], al
mov eax, dword [esp + 0x4c]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x52d862
mov edx, dword [esp + 0x4c]
push edx
call fcn.004b7f30
add esp, 4
mov eax, dword [esp + 0x44]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x52d87c
mov edx, dword [esp + 0x44]
push edx
call fcn.004b7f30
add esp, 4
mov eax, dword [esp + 0x24]
cmp dword [eax + 8], 0
je 0x52d898
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x28]
call fcn.004b7fa0
or byte [esp + 0x12], al
mov al, byte [esp + 0x12]
mov edx, dword [esp + 0x14]
or byte [esp + 0x13], al
cmp dword [edx + 8], 0
jne 0x52d8b1
cmp byte [esp + 0x1f], 0
jne 0x52d8b9
test al, al
je 0x52dba8
lea ecx, [esp + 0xc]
call fcn.004d1000
cmp eax, 5
jne 0x52d8fb
lea eax, [esp + 0x154]
push eax
lea ecx, [esp + 0x10]
or ebx, 8
mov dword [esp + 0xe4], str.device
call fcn.004d1d10
push eax
lea ecx, [esp + 0xe4]
push ecx
call fcn.004b87a0
add esp, 8
test al, al
jne 0x52d90c
lea ecx, [esp + 0xc]
call fcn.004d0fb0
test al, al
jne 0x52d90c
mov al, 1
jmp 0x52d90e
xor al, al
test bl, 8
je 0x52d916
and ebx, 0xfffffff7
test al, al
je 0x52db61
lea ecx, [esp + 0xc]
call fcn.004d8c60
lea ecx, [esp + 0xc]
call fcn.004d1000
cmp eax, 4
jne 0x52d96d
lea edx, [esp + 0x16c]
push edx
lea ecx, [esp + 0x10]
or ebx, 0x10
mov dword [esp + 0xcc], str.epocroot
call fcn.004d1d10
push eax
lea eax, [esp + 0xcc]
push eax
call fcn.004b87a0
add esp, 8
test al, al
je 0x52d96d
mov al, 1
jmp 0x52d96f
xor al, al
test bl, 0x10
je 0x52d977
and ebx, 0xffffffef
test al, al
je 0x52d8b9
lea ecx, [esp + 0x78]
push ecx
lea ecx, [esp + 0x10]
call fcn.004d8f80
push eax
mov ecx, 0x6af2ec
call fcn.004b7f40
mov edx, dword [esp + 0x78]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x52d9b2
mov ecx, dword [esp + 0x78]
push ecx
call fcn.004b7f30
add esp, 4
mov edx, dword [esp + 0x14]
cmp dword [edx + 8], 0
jne 0x52d9dd
push 0xffffffffffffffff
push str.default_device
or ebx, 0x20
call fcn.004b81f0
mov edi, eax
add esp, 8
mov dword [esp + 0x64], edi
lea eax, [esp + 0x64]
jmp 0x52dac0
lea ecx, [esp + 0x14]
lea eax, [esp + 0xd8]
mov dword [esp + 0xa4], ecx
mov dword [esp + 0xa0], eax
lea ecx, [esp + 0xf8]
lea edx, [esp + 0xa0]
lea eax, [esp + 0x70]
push ecx
mov dword [esp + 0x74], 0x5ed2b4
mov dword [esp + 0xdc], str.EPOCDEVICE__
mov dword [esp + 0xfc], edx
mov dword [esp + 0x100], eax
call fcn.0052d140
add esp, 4
push 0
push eax
lea ecx, [esp + 0x20]
call fcn.004b7e30
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
cmp eax, 1
jne 0x52da55
mov eax, dword [esp + 0x18]
lea ecx, [eax + 0x12]
cmp dword [eax + 0xc], ecx
je 0x52da62
lea ecx, [esp + 0x18]
call fcn.004b9190
mov eax, dword [esp + 0x18]
mov edx, dword [eax + 0xc]
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0xa4]
push ecx
mov dword [esp + 0x68], edx
call fcn.004f2b50
mov ecx, dword [esp + 0x78]
mov al, byte [ecx]
add esp, 8
test al, al
je 0x52daa1
mov edx, dword [esp + 0x60]
lea esp, [esp]
movzx ax, al
inc ecx
mov word [edx], ax
mov al, byte [ecx]
add edx, 2
test al, al
jne 0x52da90
mov eax, dword [esp + 0x18]
or ebx, 0xc0
mov dword [esp + 0x28], eax
mov edx, 1
lock xadd dword [eax], edx
mov edi, dword [esp + 0x64]
lea eax, [esp + 0x28]
mov esi, dword [eax]
mov dword [esp + 0xb8], esi
mov eax, esi
mov ecx, 1
lock xadd dword [eax], ecx
test bl, bl
jns 0x52daf6
mov edx, dword [esp + 0x28]
and ebx, 0xffffff7f
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x52daf6
mov ecx, edx
push ecx
call fcn.004b7f30
add esp, 4
test bl, 0x40
je 0x52db18
mov edx, dword [esp + 0x18]
and ebx, 0xffffffbf
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x52db18
mov ecx, dword [esp + 0x18]
push ecx
call fcn.004b7f30
add esp, 4
test bl, 0x20
je 0x52db34
and ebx, 0xffffffdf
mov edx, edi
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x52db34
push edi
call fcn.004b7f30
add esp, 4
lea ecx, [esp + 0xb8]
push ecx
call fcn.0052d000
add esp, 4
mov edx, esi
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x52d8b9
push esi
call fcn.004b7f30
add esp, 4
jmp 0x52d8b9
mov ecx, dword [0x6af2ec]
cmp dword [ecx + 8], 0
jne 0x52dba8
push 0xffffffffffffffff
push str.No_epocroot_element_found
call fcn.004b81f0
add esp, 8
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x10]
mov dword [esp + 0x38], eax
call fcn.004d1c40
mov eax, dword [esp + 0x34]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x52dba8
mov edx, dword [esp + 0x34]
push edx
call fcn.004b7f30
add esp, 4
mov eax, dword [esp + 0x24]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x52dbc2
mov edx, dword [esp + 0x24]
push edx
call fcn.004b7f30
add esp, 4
mov eax, dword [esp + 0x38]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x52dbdc
mov edx, dword [esp + 0x38]
push edx
call fcn.004b7f30
add esp, 4
mov eax, dword [esp + 0x40]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x52d592
mov edx, dword [esp + 0x40]
push edx
call fcn.004b7f30
add esp, 4
jmp 0x52d592
push 0xffffffffffffffff
push str.Invalid_devices_element_version
call fcn.004b81f0
mov dword [esp + 0x50], eax
add esp, 8
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x10]
call fcn.004d1c40
mov ecx, dword [esp + 0x48]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x52dc3a
mov eax, dword [esp + 0x48]
push eax
call fcn.004b7f30
add esp, 4
lea ecx, [esp + 0xc]
call fcn.004d0fb0
test al, al
je 0x52d4b7
lea ecx, [esp + 0xc]
call fcn.004d1cf0
test eax, eax
je 0x52dca8
lea ecx, [esp + 0xbc]
push ecx
lea edx, [esp + 0x90]
push edx
lea ecx, [esp + 0x14]
call fcn.004d1cc0
mov ecx, eax
call fcn.004b98f0
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
push ecx
push str.Warning:_Error___s__when_parsing_devices.xml
call fcn.004b1640
add esp, 8
lea ecx, [esp + 0xbc]
call fcn.00401005
lea ecx, [esp + 0x8c]
call fcn.004010b0
jmp 0x52dd78
mov edx, dword [0x6af2ec]
cmp dword [edx + 8], 0
jne 0x52dd78
mov eax, dword [esp + 0x14]
cmp dword [eax + 8], 0
je 0x52dd5d
cmp byte [esp + 0x13], 0
je 0x52dd15
mov dword [esp + 0x6c], eax
mov ecx, 1
lock xadd dword [eax], ecx
lea edx, [esp + 0x90]
push edx
lea ecx, [esp + 0x70]
call fcn.004b98f0
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
push ecx
push str.Warning:_Missing_or_invalid_epocroot_attribute_in_device__s_in_devices.xml.
call fcn.004b1640
add esp, 8
lea ecx, [esp + 0x90]
call fcn.00401005
lea ecx, [esp + 0x6c]
call fcn.004010b0
jmp 0x52dd78
mov dword [esp + 0x74], eax
mov edx, 1
lock xadd dword [eax], edx
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x78]
call fcn.004b98f0
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push edx
push str.Warning:_No_device_matching_EPOCDEVICE___s__in_devices.xml.
call fcn.004b1640
add esp, 8
lea ecx, [esp + 0x84]
call fcn.00401005
lea ecx, [esp + 0x74]
call fcn.004010b0
jmp 0x52dd78
cmp byte [esp + 0x13], 0
je 0x52dd6b
push str.Warning:_Missing_or_invalid_epocroot_attribute_in_default_device_in_devices.xml.
jmp 0x52dd70
push str.Warning:_No_default_device_set_in_devices.xml.
call fcn.004b1640
add esp, 4
lea ecx, [esp + 0xc]
call fcn.004d8c20
mov eax, dword [esp + 0x14]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x52ddfe
mov edx, dword [esp + 0x14]
push edx
jmp 0x52ddf6
mov eax, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
mov ecx, 1
lock xadd dword [eax], ecx
lea edx, [esp + 0x7c]
push edx
lea ecx, [esp + 0x30]
call fcn.004b98f0
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
push ecx
push str.Warning:_Could_not_open_file:__s.
call fcn.004b1640
mov edx, dword [esp + 0x84]
add esp, 8
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x52dde4
mov ecx, dword [esp + 0x7c]
push ecx
call fcn.004be5e0
add esp, 4
mov edx, dword [esp + 0x2c]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x52ddfe
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.004b7f30
add esp, 4
lea ecx, [esp + 0xac]
call fcn.005053a0
mov edx, dword [esp + 0x20]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x52de24
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004b7f30
add esp, 4
mov edx, dword [0x6af2ec]
cmp dword [edx + 8], 0
jne 0x52de3f
push str.Warning:_failed_to_resolve_epocroot._nEither_n____1._Set_EPOCROOT_environment_variable_to_a_valid_value._n_or_2._Ensure_that_the_HKEY_LOCAL_MACHINESoftwareSymbianEPOC_SDKsCommonPath_registry_key_is_set__and_then_n_______a._Set_EPOCDEVICE_environment_variable_to_a_valid_device_n____or_b._Specify_a_default_device_in_the_devices.xml_file.
call fcn.004b1640
add esp, 4
jmp 0x52de49
mov esi, 0x6af2ec
call fcn.0052d1a0
mov eax, dword [ebp + 8]
mov ecx, dword [0x6af2ec]
mov dword [eax], ecx
mov edx, 1
lock xadd dword [ecx], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret